wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
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.
-
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
-
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 } }
-
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.
-
change a return variable a different color
wildteen88 replied to sanchez77's topic in PHP Coding Help
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> -
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.
-
This is bad database design. You should read up on database normalisation to setup your databases properly.
-
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;
-
change a return variable a different color
wildteen88 replied to sanchez77's topic in PHP Coding Help
What does $row['estreturn'] contain? Is it a UNIX Timestamp (eg 1250379582) or a date (dd/mm/yy) -
says call to undefined function You're supposed to use it within your query. SUM is a MySQL function
-
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 />'; }
-
upload directory contents into mysql database ?
wildteen88 replied to flexxall's topic in PHP Coding Help
Yes look into using glob or opendir, readdir and closedir to loop through the images in your image directory. -
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?
-
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.
-
Please reply to this thread. No need to start a new thread
-
When I was learning CSS based layouts I found this tutorial very helpful.
-
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.
-
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!
-
== should be = However it is not recommended to save sensitive information such as passwords within cookies.
-
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);
-
$addend=['qty']; should be $addend += $show['qty']; After your while do echo $addend;
-
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.
-
echo a variable in a form based on user selection
wildteen88 replied to jeff5656's topic in PHP Coding Help
How to change a submit button via select value. The first result looks promising. -
Help with image database with an incrementing number
wildteen88 replied to flexxall's topic in PHP Coding Help
What are you asking here? How to setup your database for storing your images? -
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?