By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,716 Members | 1,447 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,716 IT Pros & Developers. It's quick & easy.

how can I "reload" the values of a field

P: n/a
Hi there,

I try to "reload" the value of a form - field called name each time the form
is being reloaded. I put this code in the php script:

session_start();
if (isset($name)){
$_SESSION['name'] = $name;
} else {
$name = $_SESSION['name'];
}
......
<input type="text" name="name" value="echo $name;">

however, when I restart the IE Browser and reload the url, then I do NOT get
the value of $name. What do I do wrong?
Regards
Bruno
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Fri, 09 Apr 2004 22:35:35 +0200, bruno_storz wrote:
Hi there,

I try to "reload" the value of a form - field called name each time the form
is being reloaded. I put this code in the php script:

session_start();
if (isset($name)){
$_SESSION['name'] = $name;
} else {
$name = $_SESSION['name'];
}
.....
<input type="text" name="name" value="echo $name;">

however, when I restart the IE Browser and reload the url, then I do NOT get
the value of $name. What do I do wrong?
Regards
Bruno

See php.net for 'register_globals'.

<free hint>Look at your $_SESSION[] syntax, this is correct =) </free hint>

Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Jul 17 '05 #2

P: n/a
Sessions are lost when closing your browser. If I understand correctly your
situation, you need to use cookies.

<br*********@gmx.de> wrote in message
news:c5*************@ID-194188.news.uni-berlin.de...
Hi there,

I try to "reload" the value of a form - field called name each time the form is being reloaded. I put this code in the php script:

session_start();
if (isset($name)){
$_SESSION['name'] = $name;
} else {
$name = $_SESSION['name'];
}
.....
<input type="text" name="name" value="echo $name;">

however, when I restart the IE Browser and reload the url, then I do NOT get the value of $name. What do I do wrong?
Regards
Bruno

Jul 17 '05 #3

P: n/a
Thanks - I think, this is where I was thinking in a wrong direction.Bruno
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.