Jump to content

Hi everyone!


jmte

Recommended Posts

Hi, my name is maria-teres, and i am desperate for some help. i hope that one of you can help me to resolve my problem.

Lets tell my PHP-story!

 

i have on all my pages

<?PHP

session_start();

if (!$_SESSION['company_loggedin'])

?>

 

 

this because i have one menu, one for guests and one for the registred user.

this works very fine!!

 

BUT.. then i have som forms.

when a user dont fill in a post this messages comes up

 

 

    if (empty($_POST['Name'])) {

echo '<script>alert("Please enter your name");</script>';

    echo '<script>history.back(1);</script>';

exit();

 

} else {

 

the problem is that all the inputs will be deleted, so the user have to write all once again.

when i take away

 

<?PHP

session_start();

if (!$_SESSION['company_loggedin'])

?>

 

the form works fine!. so i dont know what to do? someone?  i hope i have explained well.

thanks!

 

Link to comment
https://forums.phpfreaks.com/topic/208695-hi-everyone/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.