Jump to content

DeanWhitehouse

Members
  • Posts

    2,527
  • Joined

  • Last visited

Everything posted by DeanWhitehouse

  1. http://www.phpfreaks.com/tutorial/php-security
  2. Yes, do you actually mean can we write it for you? To do this check for a session (which is set when logging in) then use a session to get that users details, if the session is not present then tell them they need to log in
  3. There is one on the main site about security
  4. Ok then run a query to get the details from the database using their id (or whatever you are setting in the session) in the query to get the correct users info
  5. Ok, do you have a question for us, if not this is the wrong section.
  6. one way would be to use PHP to find every monday between the two times, using string to time function, to improve that i would have it loop through the dates going from the start to the end adding one day at a time until it hits the first monday and from there add 7 days at a time, and record the dates for mondays in an array
  7. You should also learn how to name variables with relevant names and write code that can be understood by any programmer, then you will get help quicker
  8. Try running mysql_real_escape_string on the var first
  9. change $f = str_replace('_',' ',$f); echo '<tr><td>'.$f.'</td>'; to echo '<tr><td>'. str_replace('_',' ',$f).'</td>';
  10. Sorry i wrote it wrong Should be $sql = mysql_query("SELECT ".implode(' ,',$fieldArr)." FROM dailypricing") or die(mysql_error());
  11. Yeah i thought it didn't, that's why his question didn't make sense, therefore i was asking him to put that in to see if it is the problem.
  12. To read a text file do echo file_get_contents("file.txt");
  13. It shouldn't do that, but just in case it is caused by what i think try putting an @ symbol in front of the mail function
  14. Ok then try doing $sql = mysql_query("SELECT ".implode(' ,','_',' ',($fieldArr))." FROM dailypricing") or die(mysql_error());
  15. Also use trim to make sure they don't just have spaces
  16. change if($_GET) to if(isset($_GET['submit']))
  17. I thought the names in the db were stored as name_one etc.. So doing implode(' ,',str_replace('_',' ',($fieldArr))) will look for the word as name one not name_one
  18. The first three loops (in the array) are returning no rows, so their is no song called that for the first three.
  19. add echo mysql_num_rows($result); under the query and tell us what it says
  20. That if statement won't work because if the query fails the or die will kick in and end the script.
×
×
  • 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.