Closed Thread Icon

Topic awaiting preservation: back button & form Field Pages that link to <a href="https://ozoneasylum.com/backlink?for=8938" title="Pages that link to Topic awaiting preservation: back button &amp;amp; form Field" rel="nofollow" >Topic awaiting preservation: back button &amp; form Field\

 
Author Thread
shalvi
Nervous Wreck (II) Inmate

From:
Insane since: Oct 2003

posted posted 11-07-2003 19:26

how can i give a link to the back button as it loads the previous page intact?and i want to know also how can i give initial value in a form field? it's like after cheacking if the email address already exists it will load the page again i have done this using php...but problem is all form Fiels are flushed...i want to overcome so that all fields do not Flush.Any help?

Rinswind 2th
Maniac (V) Inmate

From: Den Haag: The Royal Residence
Insane since: Jul 2000

posted posted 11-10-2003 23:30

What??

__________________________________________
"Art has to be forgotten. Beauty must be realized."
Piet Mondriaan

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 11-10-2003 23:44

shalvi: OK a number of questions there an it might help if you rephrase them a bit as I doubt Rinswind is the only one struggling. I'll have a go though:

1. Just let people use their back button (you can provide a back button but unless there is a good reason just let the user use what they are familiar with).

2. This is a tricky one and while I suppose it could be done with JavaScript I'd recommend using PHP - althoough you say you've used it before this worked for me:

code:
header ("Cache_Control: no_cache, must_revalidate");
header ("Pragma: no_cache");

session_cache_limiter('private');

session_start();



I think a better JavaScript-based approach would be to validate the form before the user is sent to another page (there are plenty of resources out there to deal with this).

If I've misunderstood what you were aiming at then explain your problem again and we'll have another go

___________________
Emps

The Emperor dot org

shalvi
Nervous Wreck (II) Inmate

From:
Insane since: Oct 2003

posted posted 11-11-2003 15:42

Emperor: yes you are right.I want to use that in php.i'm using the following code to ridirect the page if some field are missing... but all valid field are also flushed at the same time...so user has to type them again...i think you got my scenerio now.i want to hold the form fileld value already typed correctly in the re-register.php file...

code
________________________________________________________________________
$result=mysql_query("SELECT email FROM tutor WHERE email='$email'");
if (mysql_num_rows($result) > 0)
{
header("Location: re-register.php");
exit();
}
mysql_close($dbh);
?>



Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 11-11-2003 16:43

shalvi: OK then that code I give should help. If not then you need to do soemthing like save the inputs in a session and then check to see if the values are set and if so fill the form fields.

I use somehting like this to automatically fill the sessions:

code:
if (isset ($start_over)) {
session_unregister ('session_data');
}

if (!isset($session_data)) {
session_register ('session_data');
}

while (list ($name, $value) = each ($HTTP_POST_VARS)) {
$session_data[$name] = $value;
}



You can then use $start_over to clear the session when people return to the first page and you can detect if the specific form field dat has been added and if so you can pass it back to the form.

Let me know if that isn't clear

___________________
Emps

The Emperor dot org

shalvi
Nervous Wreck (II) Inmate

From:
Insane since: Oct 2003

posted posted 11-13-2003 22:00

sorry for the late response.....yes it's working......i am simply using
session_start();
session_register('variable');

then simply obtaining the valu in the next page...Thanx.

« BackwardsOnwards »

Show Forum Drop Down Menu