PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I hope that title is descriptive enough, otherwise I did honestly try to abide by the forum rules. However, this code is as the title suggests foreach loops to validate input, if its validated (this is where my problem is, well one of them), I want to send the user to the next page. admin.php
If you're only trying to validate the username and password, just use an "if" construct and compare the input to the $user and $pass variables. If they both match, include the admin.php file (make sure that file has some validation so people can't just access it directly).
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
My purpose for this is as follow,
this form
[syntax="html"]
<form action="pass.php" method="POST">
<p><b>your name</b>
<input type="text" name="name" size="30"></p>
<p><b>your pass</b>
<input type="text" name="pass" size="30"></p>
<input type="submit" name="submit" value="submit for check" size="30"></p>
will process the form input, and send it to that php i showed you all[/syntax]
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Well what are the better ways, I ask these questions so I can become better versed, I'm not asking you to do the work for me, but rather guide me if you have an idea.
aaronhall wrote:If you're only trying to validate the username and password, just use an "if" construct and compare the input to the $user and $pass variables. If they both match, include the admin.php file (make sure that file has some validation so people can't just access it directly).