![]() |
php guys -- database query, help!
On my "add user" page I need a query that will check if the login supplied already exists and if it does I need the user to be redirected to signup.php?name=1.
I am going on 40 something hours of no sleep, and I need to get this done, help is very much appreciated. And needed. Thanks a ton to whoever can help!! |
Code:
$DBH = mysql_connect( ... ); |
thats almost exactly what i have, but does the same thing. no go.
|
it just goes through the rest of the actions as if the header redirect doesn't fucking exist.
|
Quote:
Code:
exit(); |
$DBH = mysql_connect( ... );
mysql_select_db( 'database', $DBH ); $sql = "SELECT username FROM table WHERE username = 'foo'"; $query_result = mysql_query( $sql, $DBH ); if ( mysql_num_rows( $query_result ) hahahaha 1 ) { header( "Location: http://" . $_SERVER[ 'HTTP_HOST' ] . "/signup.php?name=1" ); exit(); } |
I have no idea why I didn't exit my code, I write beautiful code, must be time to catch up on that sleep. Thanks a ton guys, you're fucking great.
|
| All times are GMT -7. The time now is 04:10 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123