![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Nov 2012
Posts: 713
|
Php Basic Code
Code:
<?php #host = "localhost"; #user = "root"; #pass = "pass"; #db = "test"; mysql_connect(#host, #user, #pass); mysql_select_db(#db); if (isset($_POST['username'])) { $username = $_POST['username']; $password = $_POST['password']; $sql = "SELECT " FROM users WHERE username='".#user."' AND password='".#pass."' LIMIT 1"; #res = mysql_query($sql); if (mysql_num_rows(#res) == 1) { echo "You have successfully logged in"; exit(); } else { echo"Invalid Log In information. Please return to the previous page."; exit(); } ?> What is wrong with this code? Can't figure it out! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: May 2008
Posts: 3,406
|
you are missing }
before the 2nd if |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Barterer
Industry Role:
Join Date: Aug 2004
Posts: 4,864
|
Sql injection has gotten very advanced...
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
|
Quote:
ref: http://www.w3schools.com/php/func_my...ape_string.asp
__________________
SSD Cloud Server, VPS Server, Simple Cloud Hosting | DigitalOcean
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Aug 2005
Location: YUROP
Posts: 8,609
|
why is there #user instead of $user ?
__________________
![]() Anal Webcams | Kinky Trans Cams Live | Hotwife XXX Tube | Get your Proxies here |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
|
i thought its new way of declaring vars in latest php ....
duh.. me
__________________
SSD Cloud Server, VPS Server, Simple Cloud Hosting | DigitalOcean
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed User
Industry Role:
Join Date: Aug 2005
Location: YUROP
Posts: 8,609
|
Quote:
![]()
__________________
![]() Anal Webcams | Kinky Trans Cams Live | Hotwife XXX Tube | Get your Proxies here |
|
![]() |
![]() ![]() ![]() ![]() ![]() |