Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    May 2006
    Posts
    59
    Thanks
    2
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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!||||

  • #3
    New Coder
    Join Date
    May 2006
    Posts
    59
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •