Follow us on Twitter!
Capitalism is an Island of wealth in a sea of poverty
Friday, April 18, 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: 26
Guests Online: 21
Members Online: 5

Registered Members: 82825
Newest Member: bulmers
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\").