English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

im new and im trying to... when someone enter there username in index.php and press on submit the page to load user.php and desplay this user name with the help of cookies, but this is what i get (some text is in bulgarian):

Hello, $username!
Click here to change your username or click here to continued!

the index.php code is:


Please enter your username:







the user.php code is:
setcookie ("user", $username);
?>
echo 'Hello, $username!
Click here, to change your username or click here to continued!'
?>

ps: im useing WAMP5 1.6.6

2006-12-10 01:36:39 · 2 answers · asked by Mitko 3 in Computers & Internet Programming & Design

2 answers

Try this:

/* setting the cookie */
setcookie("user", $_POST["username"]);
?>

/* echoing the data in the cookie */
echo $_COOKIE["user"];
?>

Your code seems to assume that register_globals is ON, which is OFF by default as of PHP 4.2.0. The use of the COOKIE and POST superglobals should fix your problem. COOKIE stores cookie data and POST stores form data. This is the best way to use this data in PHP.

2006-12-10 12:42:42 · answer #1 · answered by simguru 2 · 0 0

First u ought to get a good anti virus application, the virus r speaking approximately runs as u initiate ur gadget, if u u can to to job supervisor then to pass the precesses tab and then discover the document that's doing this, u will would desire to terminate that technique, If u have discovered the technique call then do a seek to hit upon the place is the virus placed, then in simple terms delete it. warning the virus often locates itself in a gadget folder utilising a attractiveness very equivalent to gadget archives, u would by probability delete gadget document collectively as doing this. there are particular courses the can seek the startup entries and discover the virus document or maybe provide u the area, I used TuneUp Utilities. And if all fails u ought to format ur workstation, backup archives that u opt for do no longer backup the rest, this virus creates copies of itself so as that it may come back even after u format the workstation wish this facilitates

2016-10-05 03:09:16 · answer #2 · answered by ? 4 · 0 0

fedest.com, questions and answers