Pikachu2000
Staff Alumni-
Posts
11,377 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Pikachu2000
-
That's the exact opposite of what you said you wanted to do, and is how it should have been to begin with: i would like it to query 6, 7, 8, 9, 10. How about explaining exactly what you're trying to accomplish.
-
What?
-
You really should be developing locally. It would save you a ton of time not having to FTP files every time you make a change and need to test it. In the meantime, then first lines in that file after the opening php tag should be: error_reporting(-1); ini_set('display_errors', 'On'); You also need to remove the line you said in a previous post that you added to the php.ini file. The syntax is incorrect.
-
Then you need to ORDER BY score ASCending instead of DESCending . . .
-
$user = $_SESSION['username']; $result = mysql_query($sql) or die(mysql_error()); <---- Why is this here? $sql isn't defined until several lines later, so of course the query is empty. if ($_POST['submit']) { $_POST['message'] = mysql_real_escape_string(htmlentities($_POST['message'])); $sql = "INSERT INTO chat (user, message) VALUES ('$user', '$_POST[message]')"; $result = mysql_query($sql) or die(); See my comment in the code.
-
Go change your database password on the server right now, since you just posted it on the internet.
-
Notice which line the error is on, then look at which line your connection to the database is on. Something seem backwards?
-
You shouldn't be using a URL with include/require anyhow. You should be using a filesystem path.
-
Trying To Complete This Date Function
Pikachu2000 replied to johnsmith153's topic in PHP Coding Help
It's human nature to stick with methods one knows best, and is most comfortable with. -
Trying To Complete This Date Function
Pikachu2000 replied to johnsmith153's topic in PHP Coding Help
I'm guessing the reason is that the old fashioned method is older. -
Either with the MySQL function SUBSTRING(), or with the PHP function substr.
-
The point is, if you aren't getting that error, then something is wrong. There is no such function, unless you've created it yourself. And I don't see anything in the code showing that you have done that. Do you even have error reporting turned on?
-
Where are you stuck, exactly?
-
I don't understand how you aren't getting Fatal error: Call to undefined function ctype_alphanum().
-
http://bit.ly/QZP7vP
-
Which Page To Insert From? (Account Validation)
Pikachu2000 replied to justlukeyou's topic in Application Design
Go read the manual again. If you don't understand it, there are plenty of examples in it you can try on your own. -
Which Page To Insert From? (Account Validation)
Pikachu2000 replied to justlukeyou's topic in Application Design
Read this: http://php.net/manual/en/language.types.string.php -
Do it the same way, except make the image the link instead of the text.
-
Which Page To Insert From? (Account Validation)
Pikachu2000 replied to justlukeyou's topic in Application Design
Start echoing things until you find out where a value changes to something other than what you'd expect it to be. -
It is most assuredly an array. Post the form html, and the code that processes it.
-
If it says 'Array', then what makes you think it's anything other than an array?
-
You can't directly echo an array. You need to loop over it with foreach and echo each element in the loop.
-
Insert Defaultimage.png Upon Membership Registration?
Pikachu2000 replied to justlukeyou's topic in PHP Coding Help
He's been told that repeatedly and refuses to do it. -
And precisely what steps have you taken to debug this issue on your own?