Jump to content

pocobueno1388

Members
  • Posts

    3,369
  • Joined

  • Last visited

    Never

Everything posted by pocobueno1388

  1. $InsetLog = mysql_query("INSERT INTO userlogs (UserID, Log, `Date`) VALUES ('{$_SESSION['Current_User']}', '$Username failed to logged in.', '$Date')") or die(mysql_error());
  2. Nope...not in there either. it would look like this <?php function sqlQuery(){ //code in between } ?>
  3. If thats where the function is defined, then yes.
  4. Still not the function... The function is probably defined in _prepend.php.
  5. No yoru sqlQuery function, not your table structure. You use it in your code like this SQLquery("SELECT * FROM activities"); We need to see what that function looks like.
  6. Just like you already put http://www.uberpilotdudes.com/Calendar.php?action=1
  7. You could do this <?php if (isset($_GET['action'])) $month = $_GET['action']; else $month = date(n); ?> Now if action is set in the URL, it will display that month. If there is no action, it will display the current month by default. Is that what your after?
  8. Did you try changing what I told you to? Your going to have to explain that a little more...
  9. Change $month = echo date(n); To $month = date(n); ---------------------------- Change <iframe src ="Calendars/<?php $month ?>.htm"> To <iframe src ="Calendars/<?php echo $month; ?>.htm"> So your files are named like 1.php, 2.php, etc, right?
  10. You had quite a bit of missing stuff. You didn't have an opening form tag, and your submit button didn't have a name. Also, your PHP logic was a bit messed up. So try this and see if it is what you want <html> <head> </head> <body bgcolor="#FFCC00"> <div> <font face="Arial" size="2"> <table border="0" width="100%" id="table1" bgcolor="#FFFFFF"> <tr> <td width="126"> <table border="0" width="107%" id="table2"> </tr> </table> </td> <td width="797" valign="top"> <td> </td> <td width="434"> </td> </tr> </table> <font face="Arial" size="2"> <form method="post"> <table border="0" width="67%" id="table4"> <tr> <td> </td> <td width="434"><font face="Arial" size="2"> Please place your email address here: <input name="email" type="text"> <br> <br> Please write your message to here, and we <br> will contact you shortly:<br> <textarea name="message" rows="2" cols="40"></textarea><br> <input type="submit" name="Submit" value="Click here to send your email!"> <br><br>(If the text has cleared from the form fields, <br>your email has been sent successfully. <br>Please do not reclick.) </font> <p align="left"><font face="Arial" size="2"> </td> </tr> </table> </font> <p align="center"></p> </form> <p align="center"> </p> <p></td> </tr> </table> </font></div> <?php if (isset($_POST['Submit'])){ if (isset($_POST['email']) && $_POST['email'] != ""){ $to = "email@mydomain.com"; $subject = "Website Email"; $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; $headers = "From: $email"; $sent = mail($to, $subject, $message, $headers) ; if ($sent) { print ""; } else { print "We encountered an error sending your mail"; } } else { echo "You didn't fill in your email!"; } } ?> </body> </html> Also note that any messages will appear at the BOTTOM of your script since your PHP code is at the bottom. I wasn't sure if you wanted it like that, so I left it.
  11. Change this line if (mysql_num_rows($result_a)) To if (mysql_num_rows($sql))
  12. You executing the query twice. Change this line $result_a = mysql_query("SELECT * FROM authortoperson WHERE feed_id = '$feed_id' AND entry_id = 0 "); To $result_a = "SELECT * FROM authortoperson WHERE feed_id = '$feed_id' AND entry_id = 0";
  13. I did more than take out the unnecessary PHP tags. Can you post you form?
  14. DUH! I am having all sorts of brain farts today >.> $query = mysql_query("SELECT u.username FROM users u INNER JOIN active_users a ON a.username=u.username WHERE a.timestamp < (NOW() - INTERVAL 5 MINUTE) AND u.username='insert_username_here'")or die(mysql_error()); Put the username where it says "insert_username_here".
  15. Try <?php if (isset($_POST['Submit'])){ if (isset($_POST['email']) && $_POST['email'] != "") echo '<h1>Thank you for filling out this form!</h1>'; else echo "Please fill the email field out"; } else { $to = "email@mydomain.com"; $subject = "Website Email"; $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; $headers = "From: $email"; $sent = mail($to, $subject, $message, $headers) ; if ($sent) { print ""; } else { print "We encountered an error sending your mail"; } } ?> [code] [/code]
  16. I was thinking you might be back with that question Lets try an INNER JOIN instead. $query = mysql_query("SELECT u.username FROM users u INNER JOIN active_users a ON a.username=u.username WHERE a.timestamp < (NOW() - INTERVAL 5 MINUTE)")or die(mysql_error());
  17. Try this $query = "SELECT Restaurants.ID, Restaurants.Name, Restaurants.Phone, RestAddress.Address, RestCategories.Name AS Categories FROM ((Restaurants INNER JOIN RestAddressMap ON Restaurants.ID = RestAddressMap.RestaurantID) INNER JOIN RestAddress ON RestAddress.ID = RestAddressMap.RestAddressID) INNER JOIN RestCategories ON RestCategories.ID = Restaurants.CategoryID WHERE Restaurants.ID = '$thisID'"; $result = mysql_query($query)or die(mysql_error());
  18. Oops, I don't know why I put "MIN" instead of "MINUTE", haha. Change it to $query = mysql_query("SELECT u.username FROM users u LEFT JOIN active_users a ON a.username=u.username WHERE a.timestamp < (NOW() - INTERVAL 5 MINUTE)")or die(mysql_error());
  19. Change it to $query = mysql_query("SELECT u.username FROM users u LEFT JOIN active_users a ON a.username=u.username WHERE a.timestamp < (NOW() - INTERVAL 5 MIN)")or die(mysql_error());
  20. Okay, try this query. Make sure all the field and table names are correct SELECT u.username FROM users u LEFT JOIN active_users a ON a.username=u.username WHERE a.timestamp < (NOW() - INTERVAL 5 MIN)
  21. It's because your query isn't right. You said that "active_users" is the name of another TABLE, right? If it is, then you can't use it in your query like it's a row in whatever table the username is in. What is the name of the table that stores the username, and what is the table structure of the "active_users" table?
  22. You could do this <?php if ($row['col'] == 'home') $checked = "checked='yes'"; else $checked = ""; echo "<input type='checkbox' name='name' value='val' $checked>"; ?>
  23. Your not connected to the database. Also add a or die(mysql_error()) to the end of your query.
  24. Well, assuming you have some sort of "last active" field in the database, you could do this. <?php $query = mysql_query("SELECT username FROM table WHERE username='Lamez' and last_active < (NOW() - INTERVAL 5 MIN)"); if (mysql_num_rows($query) > 0){ echo "Online"; } else { echo "Offline"; } ?>
×
×
  • 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.