Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. If the page is completely blank, there is probably a fatal error in your code. Put the following lines directly below your opening<?php tag (which you shouldn't be using short tags). ini_set ("display_errors", "1"); error_reporting(E_ALL);
  2. Maq

    char vs varchar

    Yeah sorry. Read the example in the manual and just typed 30 characters without thinking.
  3. This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=331371.0
  4. Maq

    char vs varchar

    They're stored differently and CHAR can only hold up to 30 characters. Read more here: http://dev.mysql.com/doc/refman/5.0/en/char.html
  5. Maq

    MOVED: hello

    This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=331375.0
  6. Maq

    hello

    You should be using localhost to reference the file so your web server can parse the file.
  7. This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=331361.0
  8. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=331343.0
  9. 1) In the future, please use tags around your code. 2) This is a JS question, not PHP.
  10. Depends on what you're doing. mysql_pconnect
  11. Yep w3schools is not a reliable resource, check out Nightslyr's sig link.
  12. Here: $name = $_SESSION["username"]; Why yes, apparently it is.... You're drinking earlier than usual
  13. Here: $name = $_SESSION["username"];
  14. Look at the MySQL UPDATE syntax: http://dev.mysql.com/doc/refman/5.0/en/update.html You're not specifying table names so your queries are failing.
  15. You probably want to use sessions: http://www.tizag.com/phpT/phpsessions.php There may be a better way depending on what exactly you want to do.
  16. 1) DO NOT double post. 2) Use .
  17. So essentially there is no syntax similar to the following without having to use the WHILE loop each time; Then don't use a while loop. $row = mysqli_fetch_array($result); echo $row['cnt']; Or could I simply use the mysqli_num_rows()? COUNT returns a single row/value, so mysqli_num_rows() would always return 1. If you don't use COUNT, then using mysqli_num_rows() would be inefficient. It's better to use SQL, that's what it was designed for.
  18. Are you asking how to display the count result? If not, could you elaborate? I would change the query to alias the count (easier to reference & read): $query = "SELECT COUNT(ItemField_1) AS cnt WHERE ListID='" . $listid . "'"; In your PHP you would then reference 'cnt' from the $row array: while ($row = mysqli_fetch_array($result)) { echo $row['cnt']; }
  19. Do this calculation in MySQL using COUNT: http://dev.mysql.com/doc/refman/5.1/en/counting-rows.html
  20. Please, as mens mentioned, if you want a critique then post there: http://www.phpfreaks.com/forums/index.php?board=10.0
  21. Maq

    Hey freaks :D

    Hi Fred, welcome to PHPFreaks.
  22. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=331128.0
  23. This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=331130.0
  24. Kind of what like Mabismad said, you are using POST as a function rather than an array. Change these to: $test1=$_POST['firstname'];
×
×
  • 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.