Jump to content

Ixzion

Members
  • Posts

    52
  • Joined

  • Last visited

Everything posted by Ixzion

  1. What you need for DB_NAME is not 'ask'. That is the name of the table. You need to use the database name, which you said was 'question'. Also, you should never post your username/password publically. I'd recommend changing them.
  2. You are not echoing any error message for the user to see. In your first post, $dateErr is an empty string when it gets to the bottom. You need to echo each variable you want to display a message.
  3. Thanks for the explanation! Cheers!
  4. I was working with something involving !=, which always manages to find some way to trip me up, but I'm finding this one odd and I'm wondering if one of you fine people can shed some light on it. This was the setup: if (($thing != 0) && ($thing != "")) {echo "Hello";} If $thing = 1, then this works.If $thing = 'taco', this does not work. But if $thing == 'taco', then obviously it doesn't equate to 0. The way I figured out a solution to this was by changing it to this: if (($thing != "0") && ($thing != "")) {echo "Hello";} With the 0 in quotation marks. Why did I have to do that? My guess is that if $thing is a string and my comparison is looking for an integer, that it borks it up somehow. But someone who knows would be nice.
  5. Ixzion

    FILE Display ERROR

    I'm getting this when check for a post when I submit the form to itself: So I think your code is okay. I don't know what the cause of it is, unfortunately. But here's my full code. Maybe it will help: <?phpif ($_POST) { echo "Image file format: " . $_FILES['imagefile']['type']; //PASTES image/jpeg echo "<br>"; echo "Flash file format: " . $_FILES['flashfile']['type']; //DOESNT PASTE ANYTHING} ?><form action="self.php" method='post' enctype='multipart/form-data'> <label for='imagefile'>Image (.JPG):</label> <input id='form_addgame' type='file' name='imagefile' id='imagefile' /><input type="hidden" name="MAX_FILE_SIZE_IMG" value="3000000" /> <!-- 3000 KB --> <label for='flashfile'>Flash (.SWF):</label> <input id='form_addgame' type='file' name='flashfile' id='flashfile' /><input type="hidden" name="MAX_FILE_SIZE_SWF" value="5000000" /> <!-- 5000 KB --><input type="submit" /></form>
  6. I'm not gonna do your homework for you, but I'll give you some pointers in the right direction. Using the php.net manual will help a lot. 1. Look up empty and is_numeric.2. I don't know what this means.3. Use comparison operators (==, >, <, etc).4. You'll probably want something like if ($this && $that && $other) { do something }
  7. Hey guys. I'm Ixzion and I'm here to help and get helped. Haha.
×
×
  • Create New...