Follow us on Twitter!
The important thing is not to stop questioning. - Albert Einstein
Thursday, April 24, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 19
Guests Online: 19
Members Online: 0

Registered Members: 82904
Newest Member: jamessmith123
Latest Articles
View Thread

HellBound Hackers | Computer General | Trouble Shooting

Author

php trouble


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 14-11-06 00:25
when i run this as admin.php and hit submit my site goes to www.mysite.com/$_SERVER[PHP_SELF] instead of checking itself, i just learned php today and any help with this would be great.


<?php
if ($_POST['user'] == 'admin' && $_POST['pass'] == 'anahacker')
print 'LOGIN CORRECT, DATA WILL BE ADDED SOON';
else
print '
<form action="$_SERVER[PHP_SELF]" method="post">
ADMIN:<input type="text" value="" name="user" /> <br />
PASS:<input type="password" value="" name="pass" /> <br />
<input type="submit" value="submit" />
</form>
';
?>
Author

RE: php trouble


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 14-11-06 00:46
Since you're using echo() to produce HTML source, you're going to want to put backslashes in front of the quotation marks (e.g. <input type=\"text\").