Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Were going to need more info. Syntax wise, there is nothing wrong with the code you have posted.
  2. How exactly do you believe that to be the expected output of the code posted?
  3. This topic has been moved to PHP Installation & Configuration. http://www.phpfreaks.com/forums/index.php?topic=310649.0
  4. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=310661.0
  5. This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=310611.0
  6. I can't be of much help because I don't use windows, but have you done as Mchl suggested?
  7. Does the xamp directory exist within your htdocs directory?
  8. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=310618.0
  9. Read the previous replies again. There is no point us endlessly repeating ourselves.
  10. <?php mysql_connect ("localhost", "root","password") or die (mysql_error()); mysql_select_db ("postcode"); $term = $_POST['term']; if ($sql = mysql_query("SELECT * FROM uk_postcodes, zones WHERE postcode LIKE '%$term%' AND zone_id = zone_large ")) { if (mysql_num_rows($sql)) { while ($row = mysql_fetch_array($sql)){ echo '<br/> Postcode: '.$row['postcode']; echo '<br/> Town: '.$row['town']; echo '<br/> County: '.$row['county']; echo '<br/> Small: £'.$row['price_s']; echo '<br/> Medium: £'.$row['price_m']; echo '<br/> Large: £'.$row['price_l']; echo '<br/><br/>'; } } else { echo "please contact us for price"; } } ?>
  11. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=310622.0
  12. Are you accessing the file via http://localhost ?
  13. This topic has been moved to Other Programming Languages. http://www.phpfreaks.com/forums/index.php?topic=310589.0
  14. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=310577.0
  15. If you want code written for you we have a freelance board. This board is for help with code you have written and are having issues with.
  16. This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=310484.0
  17. SQLite's data types are very different to that of other databases. You in fact don't even need to declare data types for anything other than auto incrementing fields (which must be declared as INTEGER). I suspect this could be the cause of your problems, unfortunately, I don't offer any solution however. You should read the Sqlite docs for further info, its been a long while since of read them.
  18. In order for your users to be able to include a remote file they would need to have allow_url_include enabled within there php.ini. This is disabled by default. A better option would be for them to call.... <?php echo file_get_contents('http://myscript.com/whatever.php'); ?> as allow_url_fopen is enabled by default or for them to use curl, either way, what your providing should be sufficient. You will however likely require your users to pass an id via the querystring so that your script can identify them and get the correct data. eg; <?php echo file_get_contents('http://myscript.com/whatever.php?id=someuniquecode'); ?>
  19. I don't see how using a forum vs a vcs makes any sense. Two completely different tools & not at all related IMO.
  20. Ruby on Rails is NOT a design pattern.
  21. What version of php are you using? GOTO requires 5.3*
  22. You should remove it altogether. if ($result = mysql_query("SELECT * FROM staff WHERE date >= '".date('Y-m-d').' 00:00:00'."' AND date < '".date('Y-m-d').' 23:59:59'."' ") { if (mysql_num_rows($result)) { echo "<table border='1'> <tr> <th>ID</th> <th>Name</th> <th>Job Number</th> <th>Date</th> </tr>"; while ($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row["ID"] . "</td>"; echo "<td>" . $row["Name"] . "</td>"; echo "<td>" . $row["jobNO"] . "</td>"; echo "<td>" . $row["Date"] . "</td>"; echo "</tr>"; } echo "</table>"; } }
  23. Why do you have two while() statements? The first time you call mysql_fetch_array() (in your first while()) you never use the data it returns (this holds your first record).
  24. Most web applications use one authenticated user only to connect to there databases.
×
×
  • 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.