flyclassic Posted June 26, 2006 Share Posted June 26, 2006 Hi, i i've a following problem here, For example, i've two php files, signup.php and process.php. The signup only allows user to key in their name and personal info, once submit, it will go into process.php<signup.php> Name - <input name="Name" type=text id="Name" value="<?php echo $_COOKIE['Name'];?>" size=40 maxlength=100>Personal Info - <input name="PInfo" type=text id="PInfo" value="<?php echo $_COOKIE['PInfo'];?>" size=40 maxlength=100>submit button<process.php>setcookie (Pinfo, $_POST['Pinfo']);setcookie (Name, $_POST['Name']);if(!$PInfo ||!$Name){ echo "Personal Info or Name is a required field. Please key in again<br/>"; }include 'signup.php';exit();.................//If the user enters only one of the field, user will be asked to key in again with both fields filled up, and signup.php will be shown up again for user to key in again. Problem here is, the cookie i set doesn't appear in the field straight in the include 'signup.php' section. Unless i relocate back to signup.php it the cookies value won't appear. I want the user not to retype again without going back the previous page, but just retype from there Anybody knows how to solve this problem? I'm not sure if i explain well enough my situation but i hope somebody can help .. :) Quote Link to comment https://forums.phpfreaks.com/topic/12903-qns-on-cookie-and-forms/ Share on other sites More sharing options...
.josh Posted June 26, 2006 Share Posted June 26, 2006 check this thread out:[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=96378&hl=\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?...topic=96378&hl=[/a] Quote Link to comment https://forums.phpfreaks.com/topic/12903-qns-on-cookie-and-forms/#findComment-49532 Share on other sites More sharing options...
flyclassic Posted June 27, 2006 Author Share Posted June 27, 2006 is there anyway for my cookie to appear after setting right after without refreshing?any other useful way because, i can't use header (location: ) as i've further html tags inbetween Quote Link to comment https://forums.phpfreaks.com/topic/12903-qns-on-cookie-and-forms/#findComment-49929 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.