Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=334972.0
  2. Passing the data returned from mysql_query() directly to mysql_fetch_array() is ridiculous, you need to check this result before using it.
  3. Edit /etc/apache2/mods-available/php5.load.
  4. I very much doubt it, your missing the 'function' keyword before your __construct. As for the structure... what exactly is this thing meant to do?
  5. I didn't look at your code but passing an array is no different to passing any other variable. $a = array(); somefunction($a);
  6. Try Google, this is a developers website.
  7. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=334783.0
  8. Not that I'm aware of, and I worked as a developer within the publishing industry for about 3 years up until recently.
  9. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=334676.0
  10. You can start with an empty file, there isn't likely to be any configurations within the existing files that you will want. .htaccess files reside over the directory they are place in and all child directories unless they again contain another directory, so yes, if you need the rules to apply to www and below, that is indeed where it belongs.
  11. None, they all sound like they are part of phpmyadmin. Just create a new one.
  12. Do you really need to use php for this? Sound more like a job for grep.
  13. This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=334617.0
  14. This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=334644.0
  15. trq

    WHILE Help

    Do you have a question?
  16. Your __construct() and call to instantiate the object looks fine, you are however not setting any of the other properties. eh; This..... $create_new_user->username; $create_new_user->password; $create_new_user->email; $create_new_user->first_name; $create_new_user->last_name; does nothing.
  17. Oh, and lastly, have you noticed that most of the code posted on this site is syntax highlighted? That is because we have tags which you should use when posting code.
  18. Firstly, PHP executes on the server side so if your having issues with different browsers the problem is likely your markup, not your PHP. Next, you haven't exactly given us much information, what exactly to you mean when you say it only works in..... Thirdly, you seem to be referencing several objects without ever creating them. Where are $session and $form defined?
  19. Just use the returned array. $arr = array_count_values($fruits); echo $arr['yellow'];
  20. Your computer needs to be able to resolve the hostname from somewhere. Add.... 127.0.0.1 square.localhost
  21. The entire book will teach you PHP. It's a great reference to start with, but I'm not saying you should read the entire book to work with simple database queries.
  22. I'm sure that code isn't an example from the resource I linked you to, it's terrible. <?php include 'connect.php'; $sql = "SELECT username FROM u_data"; if ($results = mysql_query($sql)) { if (mysql_num_rows($results)) { while ($row = mysql_fetch_assoc($results)) { echo $row['username'] . "<br />"; } } }
  23. There is a link in my signature to a book (Hudzilla), that book has an entire chapter on using databases with PHP. I suggest you start there, were not really here to write tutorials, especially considering there is already allot of information on the net.
  24. The info is stored within the $DB_USER, $DB_PASSWORD and $DB_HOSTNAME variables. Be aware that your disconnect_data() function references a variable $dbc, this variable does not exist within the function and will cause an error.
  25. Simple enough to loop through a set of records from a database, where exactly are you stuck? Can we see your code?
×
×
  • 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.