Jump to content

Requesting Info...Help!


melvnatic

Recommended Posts

Generally, the page has to be reloaded in order to take input from a field and put it into a variable:
[code]<?php
if(isset($_POST['name'])) {
    $name = $_POST['name'];
    echo "Your name is $name!";
}
?>
<form name="name" action="" method="post">
    <input type="text" name="name"/>
    <input type="submit" name="submit" value="GO!"/>
</form>[/code]
With regards to session variables, I think they are destroyed when the browser is closed, although you could clear the session data with something like $_SESSION = array();
Link to comment
https://forums.phpfreaks.com/topic/8222-requesting-infohelp/#findComment-30249
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.