Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-03-2007, 10:14 AM   PM User | #1
jhl84
New Coder

 
Join Date: May 2006
Posts: 59
Thanks: 2
Thanked 0 Times in 0 Posts
jhl84 is an unknown quantity at this point
Variable Posting Confusion

Code:
window.open('main.php?email=<?php echo $email; ?> &&fullname=<?php echo $fullname; ?>', '_parent');
is it possible to pass the variable email and fullname to the page main.php like this? I tried calling it from main.php but it gives an error saying undefined index. advice pls...

Thanks.
jhl84 is offline   Reply With Quote
Old 07-03-2007, 10:22 AM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
It should work if main.php is setup to accept $_GET input. You also can't have any spaces in the window.open parameter. Looks like you have a few. It also looks like you have an extra ampersand.
PHP Code:
window.open('main.php?email=<?php echo $email?>&amp;fullname=<?php echo $fullname?>', '_parent');
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 07-03-2007, 12:36 PM   PM User | #3
jhl84
New Coder

 
Join Date: May 2006
Posts: 59
Thanks: 2
Thanked 0 Times in 0 Posts
jhl84 is an unknown quantity at this point
Code:
<?php
$fullname = $_REQUEST['fullname'];
?>

<td width=33%>Loaned by: </td>

<td><input type="text" size="15" readonly size="5" maxlength="5" name="editname" style="border:white; background-color:#FFFFCC;" value= "<?php if(isset($_POST['searching']) || isset($_POST['searchnext'])) {echo @$name;} else if (@$_POST['clearing']) {echo $fullname;} else {echo $fullname;} ?>" /></td>
i when i click the clear button, it says undefined index for fullname. Does it mean fullname is not posted here? this is the main.php
jhl84 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 09:17 AM.


Advertisement
Log in to turn off these ads.