473,791 Members | 2,973 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how can I "reload" the values of a field

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
3 1653
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_globa ls'.

<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
Sessions are lost when closing your browser. If I understand correctly your
situation, you need to use cookies.

<br*********@gm x.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
Thanks - I think, this is where I was thinking in a wrong direction.Bruno
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4260
by: Gil | last post by:
I am trying to code my "notfound.html" page when people click on the link that will send them back to home page, that the "entire" browser is "refreshed". Reason for doing this. I have frames on the home page. When user click on the link on "notfound.html", the home page appears within the home page frame. So I see 2 home pages. I have to physically click on the "reload" button on the browser to the the appearance that I want. But I...
5
7849
by: Derek Ross | last post by:
Hello, Say I have a server that's saving the CPU temperature to 'temperature.js' once a second. The contents of the file is one single line: var temperature = "35.5"; And it changes as the temperature changes.
2
2257
by: Ante Perkovic | last post by:
Hi, "top.someFrameName.location.reload();" doesn't work for Netscape 7 (it works for Netscape 4.75!). Any idea how to fix this Thanks in advance Ante
1
2211
by: harry | last post by:
Using IE 5.5 (sp2) - no other browser compatability is neccessary! When the user makes a change to a text field I record the "dirty" event in a hidden text field i.e value set to "true". As soon as this field is "true" several extra buttons are made visible/invisible. When the page is submitted the data may result in errors which are dispplayed on an error page. On this page there's a button that just does a onClick="javascript:...
5
5216
by: chad.a.morris | last post by:
Hi everyone, I didn't know how to sum this up very well for the title, but hopefully the person(s) will come along who can help. I'm trying to use the window.event.clientX value for positioning a javascript routine, but I'm having trouble. When the javascript routine comes up, it comes up in a certain position based on window.event.clientX. However, the user could click on something in the script display (say, like a menu, or a...
3
2171
by: dhnriverside | last post by:
Hi I've got the following in my aspx <asp:textbox id="findwhat" OnKeyPress="javascript:suggest()"></asp:textbox> and the suggest function function suggest() {
3
2103
by: NuB | last post by:
I have a C# web form that allows the user to perform a search if all the required fields are filled in, which works fine, my issue is if a user does a sucessfull search then enters in data and misses a field they get a message "field Name is missing" the result grid remains, how can I have the grid not shown from the prior successful search if the users gets a validation error for missing a required field or of no records are found?
3
3507
by: OJ | last post by:
Hi, I have added code to run on a button click event which adds usercontrols to an asp:Panel control held in a contentplaceholder defined by the masterpage. for (int x = 0; x < (Master.PartyCtrl.Adults ); x++) { ASP.usercontrols_passenger_ascx passenger = new ASP.usercontrols_passenger_ascx(); this.pnlAdults.Controls.Add(passenger);
1
3818
by: Raffi | last post by:
Hi, I have an application screen with a CSS scroll area. Users click links in the scroll area which open small popup windows to enter data. When the data is submitted, the popup reloads the opener to update the page and closes itself. However when the parent page is updated, the div scrolls back to the top. Is there a way to have CSS remember the vertical scroll position and go back to it when the page is reloaded? Similar to...
0
10427
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9029
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5431
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.