$result = mysql_query("SELECT `user_id` FROM `users` WHERE `user_name` = `{$user_name}` AND `user_password` = `{$user_password}`");
Search found 8 matches
- Tue Aug 27, 2013 10:52 pm
- Forum: Tutorials
- Topic: Private Message System [part 04] ERROR
- Replies: 15
- Views: 5871
Re: Private Message System [part 04] ERROR
- Tue Aug 27, 2013 10:33 pm
- Forum: Tutorials
- Topic: Private Message System [part 04] ERROR
- Replies: 15
- Views: 5871
Re: Private Message System [part 04] ERROR
PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
Whats wrong with it?
Whats wrong with it?
if (mysql_num_rows($result) !== 1){ return false; } return mysql_result($result, 0); //return ID.
- Tue Aug 27, 2013 9:53 pm
- Forum: Tutorials
- Topic: Private Message System [part 04] ERROR
- Replies: 15
- Views: 5871
Re: Private Message System [part 04] ERROR
But shouldn't be triggered?
if (($user_id = validate_credentials($_POST['user_name'], $_POST['user_password'])) !== false){
$_SESSION['user_id'] = $user_id;
header('Location: index.php?page=inbox');
die();
}
if (($user_id = validate_credentials($_POST['user_name'], $_POST['user_password'])) !== false){
$_SESSION['user_id'] = $user_id;
header('Location: index.php?page=inbox');
die();
}
- Tue Aug 27, 2013 8:57 pm
- Forum: Tutorials
- Topic: Private Message System [part 04] ERROR
- Replies: 15
- Views: 5871
Re: Private Message System [part 04] ERROR
lol.. never ending problems.. sorted that, but when I login with correct details from the database still says "Login Failed."
- Tue Aug 27, 2013 2:24 pm
- Forum: Tutorials
- Topic: Private Message System [part 04] ERROR
- Replies: 15
- Views: 5871
Re: Private Message System [part 04] ERROR
After removing that white space, the error log says:
PHP Parse error: syntax error, unexpected T_STRING in /home1/kez/public_html/chat/core/inc/user.inc.php on line 5
PHP Parse error: syntax error, unexpected T_STRING in /home1/kez/public_html/chat/core/inc/user.inc.php on line 5
- Tue Aug 27, 2013 2:04 pm
- Forum: Tutorials
- Topic: Private Message System [part 04] ERROR
- Replies: 15
- Views: 5871
Re: Private Message System [part 04] ERROR
Didnt see that error, but nope, its still not fixed Index.php: http://pastebin.com/vZuBX9wd <?php include('core/init.inc.php'); ?> <html> <head> <link rel="stylesheet" type="text/css" href="ext/main.css"> </head> <body> <div id="wrap"> <?php include($include_f...
- Tue Aug 27, 2013 1:48 pm
- Forum: Tutorials
- Topic: Private Message System [part 04] ERROR
- Replies: 15
- Views: 5871
Re: Private Message System [part 04] ERROR
The whole of that class: (init.inc.php) <?php $core_path = dirname(__FILE__); if (empty($_GET['page']) || in_array("{$_GET['page']}.page.inc.php", scandir("{$core_path}/pages")) == false){ header('HTTP/1.1 404 Not Found'); header('Location: index.php?page=inbox'); die(); } sessio...
- Tue Aug 27, 2013 12:40 pm
- Forum: Tutorials
- Topic: Private Message System [part 04] ERROR
- Replies: 15
- Views: 5871
Private Message System [part 04] ERROR
When I load up the page, I get a blank while webpage. Ive checked the error log and it says this: PHP Warning: Cannot modify header information - headers already sent by (output started at /home1/thewizki/public_html/chatk/core/init.inc.php:2) in /home1/thewizki/public_html/chatk/core/init.inc.php o...