This is where you share YOUR scripts with others

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Wed Jul 13, 2011 3:28 am


Postby newguy11 » Wed Jul 13, 2011 3:43 am

So here is the code I am using at the moment and I know its very basic. What I would like to happen is for the php to check weather the username and password is correct then link directly to another URL but with this code it just pulls up a blank screen with /processphp at the end of the URL. Can someone please help me to understand why this isn't quite working the way I need it to and help me to fix it?

Code: Select all

$username = $_POST["username"];
$password = $_POST["password"];
$actualusername = "newguy11";
$actualpassword = "password";

if($username == $actualusername && $password == $actualpassword){
echo "<a href=>";
else {
echo 'info';

User avatar
php-forum GURU
php-forum GURU
Posts: 2196
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: Link

Postby egami » Thu Jul 14, 2011 4:55 am

If you pull up this website, what happens? ... late3.html

New php-forum User
New php-forum User
Posts: 4
Joined: Fri Jun 03, 2011 11:45 pm

Re: Link

Postby inv123 » Thu Aug 11, 2011 5:40 am

Try to add a name to your url, like:

Code: Select all

<a href=>Href title</a>

Than the link should be appeared.

php-forum Active User
php-forum Active User
Posts: 450
Joined: Fri Aug 05, 2011 9:53 am

Re: Link

Postby NigelRen » Sun Aug 14, 2011 1:05 pm

If you want it to automatically go onto a new page, then use the http_redirect ( )


Code: Select all


Return to “Your Scripts”

Who is online

Users browsing this forum: No registered users and 2 guests