Jump to content

Spring

Members
  • Posts

    224
  • Joined

  • Last visited

Everything posted by Spring

  1. You should start using <br /> instead of <BR> <BR> is old HTML which is dieing.
  2. Yeah i know. I'll inevitable have to use the database to store the timestamp, but this is a temporary fix until tomorrow.
  3. session_set_cookie_params() worked for me.
  4. I fixed mine by using sessions. session_start(); session_set_cookie_params(84600); if(isset($_POST['submit'])){ $_SESSION['clicked'] = 1; } You should know what to do from here. (:
  5. I fixed by using sessions like suggested, thanks for everyones support.
  6. Still looking for a simpler soultion, this should be possible without having to use the database, how would I check it with sessions? anyone know?
  7. Just 24 hours time. All I want is a 24 hours between clicks on the submit button for each person.
  8. I'm not sure how that would, that's why I wanted an example, how do I use the php time function to check if they clicked within 24 hours?
  9. I have the same question, but I was pretty sure you could some how use a php time function to do this..or maybe javascript? Is going through all that trouble the only way?
  10. Is there a way to use PHP time to only allow a user to press a button in a form (for example a submit button) once a day? If so, could I get an example? Thanks.
  11. mysql_query($insertAdminInfoQuery) or die("ERROR: " .mysql_error()) Forgot a semicolon, though I didn't even really read the whole script, just followed the error. needs to be mysql_query($insertAdminInfoQuery) or die("ERROR: " .mysql_error());
  12. This worked perfectly, thanks a lot.
  13. Hi, I have a field called experience in mysql and I want to add +7 to said field, is it possible using UPDATE or insert? If so, what's the syntax? Here's what I have that doesn't work, it sets experience to 7, but won't add another 7 when clicked again. if(isset($_POST['submit'])){ $query = "UPDATE account_info SET experience = +7 WHERE username = $name"; $result = mysql_query($query) or die(mysql_error()); } don't ask for the whole script, because you won't need it to answer that o.0
  14. Everything is working great now! I figured out what happen! Thanks!
  15. Edit: got this: sql: SELECT * FROM account_info WHERE username = "tony" result: Resource id #3 after mysql_fetch_array 0
  16. <?php include "database.php"; session_start(); $name = $_session['outname']; function output_wins($name){ $sql = "SELECT * FROM account_info WHERE username = '$name'"; $result = mysql_query($sql) or die(mysql_error()); $wins = mysql_fetch_array($result); return $wins['win']; } ?>
  17. I did and this is the error: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
  18. Ah, here's the error: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
  19. Ehh, it seems to work but it's not outputting anything. It's blank.
  20. $sql = 'SELECT * FROM account_info WHERE username ="'.$name.'"'; $result = mysql_query($sql) . mysql_error(); $row = mysql_fetch_row($result); I get Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource I'm trying to output the row "wins" for a certain user.
  21. How do I got about outputing one row that can only hold one value? Any reason why the function below doesn't work? <?php include "database.php"; session_start(); $name = $_session['outname']; function output_wins(){ $sql = 'SELECT * FROM account_info WHERE username ="' . $name .'"'; $result = mysql_query($sql); $wins = mysql_fetch_array($result); echo $wins['win']; } output_wins(); ?> Is there an easier way I can output this one row?
  22. Respect my authority. Jokes. Please don't hurt me. I'd like to give thanks to all of the people who have helped me recently on the problems I have been having with PHP. Sometimes, when I get a question answered, I'll be so excited to try out the solution myself, I forget to give thanks to that person who spent time out of his/her day to help me. I think the website is great and hope that it will be here for the long run. I would have probably given up no php without this site, hell, I predict that soon half of this websites posts will belong to me asking for help.
  23. I fixed by doing this. body{ width: 800px; height: 600px; }
  24. Ehhh, css doesn't offer a fix to this? I don't want to redo the css for each screen size.
  25. He has different monitor dimensions than me, is there something ins css that will work for all dimensions?
×
×
  • 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.