Old 01-20-2006   #1 (permalink)
Registered User
 
Join Date: Apr 2005
Location: antwerp, belgium
Posts: 51

problem with id-selectors and iframe

Chaned the server of a site and now i can't see different pages anymore, links are constructed as following

PHP Code:
echo "<a href=?".result['id'].">name</a>"
it used to work on the old server but, now it doesn't anymore
it all work inside an iframe, so i think the iframe gives some problems or so
__________________
sneeuwbal is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 01-20-2006   #2 (permalink)
Invicible Snake
 
ParaSnake's Avatar
 
Join Date: Sep 2004
Location: Ho Chi Minh City,Vietnam
Posts: 668

Send a message via MSN to ParaSnake Send a message via Yahoo to ParaSnake
eh i think the structure must be sth like this?
Code:
echo "<a href='?var_name1=var_value&var_name2=var_value2'>link</a>";
__________________
ParaSnake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 01-20-2006   #3 (permalink)
Registered User
 
Join Date: Apr 2005
Location: antwerp, belgium
Posts: 51

oeps, sorry forgot one thing in the code I put upthere
the actual code looks like this

PHP Code:
echo "<a href=members.php?id=".$result['mem_id'].">".$result['naam']."</a> | "
so the var_name= is included in my code, it just doesn't seem to work with the iframe :s
__________________
sneeuwbal is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 01-21-2006   #4 (permalink)
Yup, that's meee!
 
thecubed's Avatar
 
Join Date: Jun 2004
Location: Infront of my screen (most of the time)
Posts: 89

Send a message via AIM to thecubed Send a message via Yahoo to thecubed Send a message via Skype™ to thecubed
What does the script output? Can you please post the HTML output of the PHP script and the source code snippet of the PHP script so that we can see what is wrong.

Hope I can help in some way
__________________

www.thecubed.com <--- TheCubed Homepage!
thecubed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 01-21-2006   #5 (permalink)
Registered User
 
Join Date: Apr 2005
Location: antwerp, belgium
Posts: 51

PHP Code:
//center
echo "<center>";

//menu above
$sql="SELECT mem_id, naam FROM bla";
$res_sql=mysql_query($sql);
while (
$result=mysql_fetch_array($res_sql)){
    echo 
"<a href=members.php?id=".$result['mem_id'].">".$result['naam']."</a> | ";
}

echo 
"<a href=members.php>band</a>";

//end center
echo "</center>";

//band
if($id == "") {echo "blabla";
} else {


    
//profile
    
$sql="SELECT * FROM bla WHERE mem_id=".$id;
    
$res_sql=mysql_query($sql);
    while (
$result=mysql_fetch_array($res_sql)){ 
output gives this
Code:
Disambiguation was found in October 2006.
The idea came from Sean and Sebas to make a porn/grind band.
Then eventually Koen (drums), Raf (guitar) and Steven (bass) joined the band after a few rehearsals and some songs Peejee joined the band as lead guitars and Raf has the rhythm guitar now.
Now we continue as a technical brutal porn death band.
We strive for perfection in our songs to kick some ass later on stage.
but it's suppost to give some info over the bandmember, the output it gives if the output stated in the
PHP Code:
//band
if($id == "") {echo "blabla"
line of the phpscript
__________________
sneeuwbal is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 01-21-2006   #6 (permalink)
Invicible Snake
 
ParaSnake's Avatar
 
Join Date: Sep 2004
Location: Ho Chi Minh City,Vietnam
Posts: 668

Send a message via MSN to ParaSnake Send a message via Yahoo to ParaSnake
ehhh,I think you miss this
Code:
$id = $_GET[id];
__________________
ParaSnake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 01-21-2006   #7 (permalink)
Registered User
 
Join Date: Apr 2005
Location: antwerp, belgium
Posts: 51

Quote:
Originally Posted by ParaSnake
ehhh,I think you miss this
Code:
$id = $_GET[id];
thanks, that was the prob, although i never used it before, and always seemed to work
__________________
sneeuwbal is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 01-21-2006   #8 (permalink)
Yup, that's meee!
 
thecubed's Avatar
 
Join Date: Jun 2004
Location: Infront of my screen (most of the time)
Posts: 89

Send a message via AIM to thecubed Send a message via Yahoo to thecubed Send a message via Skype™ to thecubed
In PHP.ini, there is something called regisger_globals, where you don't have to do $_POST[''] or $_GET[''] to access those variables, but when it's turned off, you have to use the long way to access your vars.
__________________

www.thecubed.com <--- TheCubed Homepage!
thecubed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 01-21-2006   #9 (permalink)
Invicible Snake
 
ParaSnake's Avatar
 
Join Date: Sep 2004
Location: Ho Chi Minh City,Vietnam
Posts: 668

Send a message via MSN to ParaSnake Send a message via Yahoo to ParaSnake
WHat??i`ve right???hehe give me some rep points now or I will bite you to pieces

jk,just make sure you dont use too much $_GET in your script,i dont mean orbit the whole things,$_GET is faster and easier to deal with than $_POST but its lack on security,stay warning when using it
__________________
ParaSnake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +1. The time now is 05:56 PM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT