Jump to content

pocobueno1388

Members
  • Posts

    3,369
  • Joined

  • Last visited

    Never

Everything posted by pocobueno1388

  1. All you have to do is check if the required fields are empty, like so <?php if (!isset($_POST['form_field'])){ echo "You didn't fill out the form field!"; } else { //it was filled out } ?> Here are some tutorials on working with forms http://www.tizag.com/phpT/forms.php http://php.about.com/od/learnphp/ss/php_forms.htm
  2. That site is a tutorial site. It is meant to teach you what you want to learn. So if you want to learn it you need to follow the steps and actually read and apply what it's telling you to do. If you don't understand a function it uses, then look it up in the manual.
  3. The file can be named whatever it wants as long as it has a .php extension.
  4. Have you tried Google. There are TONS of tutorials on this.
  5. pocobueno1388

    JOIN

    SELECT * FROM topics JOIN text ON text.msg_id = topics.mt_msg_id JOIN members ON topics.mt_from_id = members.id JOIN topics ON topics.mt_to_id = members.login
  6. Go through all the "file" tutorials on this site http://www.tizag.com/phpT/files.php
  7. They want to add the money the person won into a pot of money won by all users. So I think a database would be the best way to go. Database. Make a table like this TABLE counter -------------- winnerID - the userID of the winner of the money amount - the amount of money they won Now, whenever you want to get the total amount of money won, you would just do a query like this SELECT SUM(amount) as amount FROM counter
  8. <?php if (isset($_GET['click'])){ $rand = rand(1,2); if ($rand == 1){ $amount_won = rand(1,100); echo $amount_won."GP MONEY FOUND"; //process their money here } else { echo "Awww, you lose"; } } ?> <p> <a href="index.php?click=yes"><img src="01.png"></a>
  9. We can't help you if you don't tell us what it is, and what isn't working about it.
  10. Here is an example of how you could have them click on the image and they have a 1 out of 2 chance of getting the money. Is that enough to get you started? <?php if (isset($_GET['click'])){ $rand = rand(1,2); if ($rand == 1){ echo "You Win!"; //process their money here } else { echo "Awww, you lose"; } } ?> <p> <a href="index.php?click=yes"><img src="01.png"></a>
  11. Of course it's possible =] For the 1 in 2 chance they find money, use the rand() function. To keep track of the money, just use a database.
  12. Yes, it's possible. http://www.tizag.com/phpT/fileopen.php http://www.tizag.com/phpT/filewrite.php **** http://www.tizag.com/phpT/fileclose.php
  13. It's because the default method is GET, you want to change it to post. It will look something like this <form action="cart.php" method="post">
  14. Try SELECT * FROM `order` WHERE cust_id = '$id' AND processed = 'yes' AND processeddate < (NOW() - INTERVAL 30 DAY) ORDER BY processeddate DESC, last_name ASC
  15. Is the file a .php? Try using <?php instead of using the short tag (<?).
  16. <?php $entext = $_GET['entext']; $emtext = $_GET['emtext']; echo $entext.' '.$emtext; ?>
  17. So basically you want to make sure they have supplied a complete birthday? If you are using selects, then I will assume your first option looks something like this. [tt]<option value="none">Please Select Day/Month/Year</option> <?php if ($birth_date_year == 'none' || $birth_date_month == 'none' || $birth_date_day == 'none'){ echo "ERROR, you didn't fill out a complete birthday"; } else { //they supplied all 3 fields, continue } ?>
  18. You never select "topicid" from the database in your query...that might explain why it's empty.
  19. What does the URL look like exactly when you click on it? If there is nothing after the topicid=...then that variable is empty.
  20. You need to put the name of the script before the "?". Instead of ?topicid= It should be script.php?topicid= Also, you may want to verify that the variable $row['topicid'] isn't empty.
  21. If your able to update a row in the database without doing anything else, then most likely you should do that. If you have to manipulate data around to insert a row, or it creates unneeded information, then thats not the way to go.
  22. I agree, I doubt one is that much faster than the other that it would really matter. If your curious, why not just run your own tests?
×
×
  • 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.