View Full Version : Variable Posting Confusion

07-03-2007, 10:14 AM
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...


07-03-2007, 10:22 AM
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.

window.open('main.php?email=<?php echo $email; ?>&amp;fullname=<?php echo $fullname; ?>', '_parent');

07-03-2007, 12:36 PM
$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