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 Regex. http://www.phpfreaks.com/forums/index.php?topic=310802.0
  2. You could simply use.... $recruit1 = array(); while ($recruits = mysql_fetch_assoc($recruitsquery)) { $recruit1[] = $recruits; } and get exactly the same results as the last poster suggested.
  3. And where exactly are you planning on getting this xxxx value from?
  4. Use aliases in your query. $ra = db_query("SELECT MAX(spec_id) AS max_spec_id, MAX(spec_positionid) AS max_spec_positionid, MIN(spec_id) AS min_spec_id, MIN(spec_positionid) AS min_spec_positionid FROM spec"); Then use.... $za->min_spec_positionid
  5. PHP mail does not natively support authentication, stoping you from using remote servers. You would need to use a third part lib like phpMailer (Google it).
  6. $za is an object, not an array. Where do you define it?
  7. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=310795.0
  8. Since you mentioned xampp, is this a local dev box your using? You do relasie you need a mail server installed to be able to send email via php?
  9. Wherever I read, it's not working because of spam. Everything is blocking it from working, therefore broken? Is that a question? The mail function is not broken. You may have something on your server misconfigured, but I assure you, your problem lies elsewhere. Are you sending the correct headers? Sending a from a valid email address? Are your DNS entries configured properly?
  10. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=310792.0
  11. Post your problematic code.
  12. They very well may given your example. You have three undefined constants concatenated together, this will produce Notices
  13. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=310785.0
  14. So, how is it working and what exactly is expected?
  15. Your database credentials are incorrect.
  16. That simply means your query is failing and you haven't caught the error. Post your code in php help.
  17. This topic has been moved to PHP Installation & Configuration. http://www.phpfreaks.com/forums/index.php?topic=310702.0
  18. Your hosting does not have the mysqli extension enabled. What version of php are you using?
  19. Yes. Take a look at the API. http://code.google.com/apis/calendar/data/2.0/developers_guide.html
  20. Oh, and if your only expecting one result, you don't need the while.... mysql_connect() mysql_select_db() $query = "Select * FROM table WHERE ID = 1 LIMIT 1"; if ($result = mysql_query($query)) { if (mysql_num_rows($result)) { $row = mysql_fetch_assoc($result); foreach ($row as $k => $v) { echo "Color $k = $v<br />"; } } }
  21. $row is an associative array in your case. Your best off using a foreach. mysql_connect() mysql_select_db() $query = "Select * FROM table WHERE ID = 1"; if ($result = mysql_query($query)) { if (mysql_num_rows($result)) { while ($row = mysql_fetch_assoc($result)) { foreach ($row as $k => $v) { echo "Color $k = $v<br />"; } } } }
×
×
  • 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.