damiendarien Posted September 8, 2010 Share Posted September 8, 2010 i am having issues getting the variables to show up on localhost server within the body element. is it something in the codes or something in the php.ini settings? here is some sample code <h1>Skyward Aviation</h1> <h2>Contact Information</h2> <form action="ContactUpdate.php" method="get"> <table frame="border" rules="cols"> <colgroup width="50%" /> <colgroup width="50%" /> <tr> <td align="right" valign="top"> <p>First Name <input type="text" name="first_name" value="<?= $First ?>" size="36" /></p> <p>Last Name <input type="text" name="last_name" value="<?= $Last ?>" size="36" /></p> <p>Phone <input type="text" name="phone" value="<?= $Phone ?>" size="36" /></p> </td> <td align="right" valign="top"> <p>Address <input type="text" name="address" value="<?= $Address ?>" size="40" /></p> <p>City <input type="text" name="city" value="<?= $City ?>" size="10" /> State <input type="text" name="state" value="<?= $State ?>" size="2" maxlength="2" /> Zip <input type="text" name="zip" value="<?= $Zip ?>" size="10" maxlength="10" /></p> </td> </tr> </table> <p><input type="hidden" name="PHPSESSID" value='<?php echo session_id() ?>' /> <p><input type="submit" value="Submit" /></p> </form> In the page is shows <?= $First ?> in the area First Name textbox. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted September 8, 2010 Share Posted September 8, 2010 Assuming you've saved the file with a .php extension, the "quick echo" <?= tags may be causing your problem. What do you see if you load the page in your browser, then view the html source? EDIT: You'll need to include a session_start() before you're able to access any $_SESSION vars. Quote Link to comment Share on other sites More sharing options...
damiendarien Posted September 8, 2010 Author Share Posted September 8, 2010 thanks for your response but i had already figured it out to add the echo. Thats not the way it is supposed to be coded from the book, but it is the way i am coding it to get it to work. Thanks. I was coming here to mark "Solved" but I forgot the response time here is VERY GOOD here. Glad i joined this forum. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.