Jump to content

Proceeding to next page after validation


tet3828

Recommended Posts

I have this simple script here: it validates a password/username and moves on to the database modification page (modify.php). I need it to move to the next page only if the password/username match.. (without the user having to click a link or okay button.) how would I do this?

[code]
if (******* == "".$_POST['userName']."" & ******* == "".$_POST['userPass']."") {
echo "Username and password have been validated, thank you...";
echo "Entering Database";
[/code]

so I would soppose the code to launch open the next page should be within my if brackets.

Someone suggested putting a header & location at the top of the page. but I don't understand how that would complete the task.
Link to comment
https://forums.phpfreaks.com/topic/26653-proceeding-to-next-page-after-validation/
Share on other sites

so you would suggest.... doing away with my echo  and just using that header(location) command to go stright to the next page?

would any of this information at the top of the page interfere with the header:location redirrect?

[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Validation</title>
</head>

<body>

<?php
[/code]

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.