Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. <?php ini_set('display_errors', 1); error_reporting(E_ALL); ?> Add to the top of the page.
  2. That method can't be used in court, sorry.
  3. If you're only ever going to do that one address, why don't you just make the contents of : index.php?locate=register on an index page in a register folder?
  4. It's not just PHP. If you google it you'll find lots of tutorials on using mod_rewrite with php.
  5. Use mod_rewrite in htaccess.
  6. This is a HTML/CSS problem. However, the answer is that you are missing the # symbol in front of your color codes. Do some research on CSS while you're at it
  7. No, OOP is not essential, it is just a good model. Saying you can write good code without using OOP is like saying you can write without using functions. Yes, it's possible, but it's not as effective as it could be.
  8. I think he's trying to make some sort of load balancing?
  9. $sql = "SELECT userid FROM User WHERE (username = '$_SESSION[username]' AND password = '$_SESSION[password]')"; $result=mysql_query($sql); $_SESSION['id'] = '$result' Should be: $sql = "SELECT userid FROM User WHERE (username = '$_SESSION[username]' AND password = '$_SESSION[password]')"; $result=mysql_query($sql) or die(mysql_error().' query: '.$sql; $row = mysql_fetch_assoc($result); $_SESSION['id'] = $row['userid'];
  10. You have a return in your while loop, which will end the loop. You need to keep adding records to an array and then return that whole array when the loop is over. Also, indenting your code more neatly will help.
  11. I'm not sure max will work the way you want on a varchar field, but okay. After that just add the other fields. max(IDNumber), column2, column3
  12. A file that is included a page which makes that page redirect to itself.
  13. use the string functions in php, such as substr. The best thing to do would be to use a regular ID, not an alphanumberic one.
  14. Try this: $adult = intval($_POST['adult']); $sql = "UPDATE userdata SET adult='$adult' WHERE id=$id"; mysql_query($sql) OR die(mysql_error().' with query: '.$sql);
  15. It looks like the problem is those variables are not being posted. Where is the HTML form which posts these? Did you do print_r($_POST) at the top of the page to see what IS posted?
  16. No, you can certainly use $_POST[$var]. That is much better than using $_POST["$var"] and making PHP parse the string.
  17. You could use ADODB, that is a nice one.
  18. Would the one before it be E1002? You could just remove the e, subtract one in php and add it back on. Otherwise, you'll have to use an actual ID number as in a unique id field in your table.
  19. You want ajax. Check out mootools.net
  20. Remove all the @ error supressor symbol.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.