Jump to content

baijiazi

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About baijiazi

  • Rank
    Newbie
  1. Hi All, How do we grab the day, mth and year values from the date input with html5? Thanks
  2. Hi, Sorry abt it think I found my problem. $_SESSION['name'] = $_POST['fname']; think the page also reloaded this and as fname is empty, the session name is also empty. I put an if statement in front to do a check if fname have value before assigning it to session name and it work. Thanks for the reply.
  3. Hi all, I have just started learning PHP. I hit into this wall currently where I have a page(main.php) which stores the session value 'name' of the login personnel.On login to main.php, some sql scripts will run and username and some values will be shown on the page. The page also allows user to input some values and on submit, the value will be send to confirm.php to validate. So on confirm.php, I have this small code if ($tday < $day){ if($tmth <= $mth){ echo "Please select a valid Date!!"; header("Refresh: 3; url=http://localhost/main.php");} else{ $tempDay = cal_days_in_month(0,$mth,$yr); $tempTotal = $tday + ($tempDay-$day); $calDays = $tempTotal + 1; echo "Total Number of Days Taken is ".$calDays; } } This line header("Refresh: 3; url=http://localhost/main.php"); will redirect back to the previous page automatically after 3 seconds.but I find that the session value 'name' is not loaded. anyway i can change it to reload the whole main.php? TIABai
×
×
  • Create New...