Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. Remove the # from in front of ServerName. Lines that start with a # are comments (Apache will ignore these). Make sure you restart Apache after making any changes.
  2. It means there could be an error which is preventing the script from running. You'll get a blank screen is errors are disabled. To enable errors, at the top of your script add the following after the opening <?php tag error_reporting(E_ALL); ini_set('display_errors', 'on'); If there are any errors they should be displayed. Alternatively you can always check your servers error log
  3. This list ($name, $address, $city, $state, $zip, $phone, $venueday, $vlink, $vreview, $vmap1, $vmap2, $fgame, $sgame, $vsm, $vfd) = mysql_fetch_array($result, MYSQL_NUM); should be if(mysql_num_rows($result) > 0) { while(list ($name, $address, $city, $state, $zip, $phone, $venueday, $vlink, $vreview, $vmap1, $vmap2, $fgame, $sgame, $vsm, $vfd) = mysql_fetch_row($result)) { // your code here for displaying the row } }
  4. The name of your submit button should be named as Login Which is what? Post the error you're getting here. Or are you just getting a blank page? If its a blank page then it could mean your script is failing.
  5. Change while($row = mysql_fetch_array($result)) { to while($row = mysql_fetch_array($result)) { list($d, $m, $y) = explode('/', $row['estreturn']); $color = strtotime(sprintf('%s/%s/%s', $m, $d, $y) > time()) ? '#00F' : '#F00'; Now change <td> " . $row['estreturn'] . "</td> to <td style=\"color:$color\"> " . $row['estreturn'] . "</td>
  6. Yes. That is now the correct way for using sessions. What does your script output now? It should display user is logged in when using the correct username/password. For the wrong username/password the message user is NOT logged in will be displayed.
  7. This is bad database design. You should read up on database normalisation to setup your databases properly.
  8. Rather than use header() to see what is happing just use echo. if($count==1){ echo 'User is logged in'; } else { echo 'User is NOT logged in'; } Also you should not be using session_register for creating session variables. This function is depreciated. You should instead use the the $_SESSION superglobal when defining/using session variables. So instead of session_register("myusername"); session_register("mypassword"); session_register("mycompany"); You'd this instead $_SESSION['myusername'] = $myusername; $_SESSION['mypassword'] = $mypassword; $_SESSION['mycompany'] = $mycompany;
  9. What does $row['estreturn'] contain? Is it a UNIX Timestamp (eg 1250379582) or a date (dd/mm/yy)
  10. says call to undefined function You're supposed to use it within your query. SUM is a MySQL function
  11. This $maincat[] = $row['main_cat_id']; $maincat[] = $row['main_cat_name']; Should be just $maincat[] = $row; Now to display your results you'll want to loop through them, eg $listmaincat = new getIDs(); foreach($listmaincat->list_MainCat() as $maincat) { echo $maincat['main_cat_id'] . ' ' . $maincat['main_cat_name'] .'<br />'; }
  12. Yes look into using glob or opendir, readdir and closedir to loop through the images in your image directory.
  13. Your code does not do any form of counting. All you're telling it to do is to select all rows from the database where downloads is not equal to 0. Your then looping through the results. What where you expecting?
  14. Yes you need to set this variable when they successfully login, eg $_SESSION['is_logged_in'] = true; Please if you have any more questions continue in your previous thread.
  15. Please reply to this thread. No need to start a new thread
  16. When I was learning CSS based layouts I found this tutorial very helpful.
  17. This could be a file encoding issue. Make sure you saving file as ASCII encoding or UTF-8 without BOM. Setting the File Encoding will be available in your editors Save dialog box.
  18. What is the large file? However just so you know why you're getting the error message your script is exceeding the maximum memory limit, which is 128MB. However you script is trying to use up to 250MB!
  19. == should be = However it is not recommended to save sensitive information such as passwords within cookies.
  20. Use the MySQL IN() function in your WHERE clause. Example $ids = '3,5,7,9,10'; $query = "SELECT * FROM table WHERE id IN($ids)"; $result = mysql_query($query);
  21. $addend=['qty']; should be $addend += $show['qty']; After your while do echo $addend;
  22. WTF! This script is terrible. Where on earth did you get this crap! Sorry but I'm not going to help you any further. You should dump the script and find something else.
  23. How to change a submit button via select value. The first result looks promising.
  24. What are you asking here? How to setup your database for storing your images?
  25. The only bit that is relavent there is the make_countdown function. The do_drawing function is not relevant. Where do you call the make_countdown function?
×
×
  • 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.