Jump to content

carrotcake1029

Members
  • Posts

    32
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

carrotcake1029's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The source of your error is in your query. 1st Error: You should probably use apostrophe's instead of quotations there. 2nd Error: You need an extra space.
  2. Well, then you need to look at how you are forming your emails to be sent and research what in it's contents may be alarming the server. We can't help you unless you show us how you are making your emails. Even then it is still hard to tell. There are a lot of factors that go into spam filtering.
  3. Try this: test.php <?php $age = abs($_POST['Year'] - 1996); if ($_POST['Year'] == 1996) { echo "You are the same age as me!"; } else { if ($_POST['Year'] > 1996) { echo "You are ".$age." year(s) younger than me"; } else { echo "You are ".$age." year(s) older than me"; } } ?> test.html <form action="test.php" method='POST'> Enter the Year in which you were born<input type='text' name='Year'><br/> <input type='Submit' value='Go'><br/> </form>
  4. Your making that a bit too complicated. <?php $age = abs($_POST['Year'] - 1996); if ($_POST['Submit']) { if ($_POST['Year'] == 1996) { echo "You are the same age as me!"; } else { if ($_POST['Year'] > 1996) { echo "You are ".$age." year(s) younger than me"; } else { echo "You are ".$age." year(s) older than me"; } } } ?> Sorry had to edit, didn't fully read what you were doing, plus your logic was wrong with the less than symbol.
  5. You would want to look at what filters Hotmail is using when they judge incoming emails. I use another service so I don't know where you would look, but try to see if Hotmail has some kind of Settings page in your account.
  6. How does it get lost? Could you show some code of what you are doing so we can get a better understanding?
  7. Probably something like this. Forgive me if I made any typos. You might need to change some things to suit your needs. I am using $_GET['target'] to get the target's name. You can change the method to get the name though, it doesn't matter. <?php mysql_connect("localhost", "username", "password") or die(mysql_error()); mysql_select_db("members") or die(mysql_error()); $username = $_COOKIE['ID_my_site']; $target = $_GET['target']; $result = mysql_query("SELECT `location` FROM `users` WHERE `username` = '$username'") or die(mysql_error()); $row = mysql_fetch_row($result); $mylocation = $row[0]; $result = mysql_query("SELECT `location` FROM `users` WHERE `username` = '$target'") or die(mysql_error()); $row = mysql_fetch_row($result); $hislocation = $row[0]; IF ($mylocation == $hislocation) { //they can attack } else { //they can't attack } ?>
  8. Can you show us what html source is actually showing up? Usually right click->view source. Edit: never mind, Lumio found it
  9. UPDATE will change the value in your MySQL table. You should use SELECT on both queries. Then you compare the results of your queries for both players, and if they are both in the same place, have them attack. Otherwise, spit out a message saying they aren't in the correct location. I don't see two different queries for the two different players for comparison.
  10. Well, with php, you wouldn't be able to tell what the user entered until it went to the next page. If you want to detect it immediately, you would have to use vbscript/javascript.
  11. index.html <form action="welcome.php" method="post"> Name: <input type="text" name="name" /><br /> Age: <input type="text" name="age" /><br /> <input type="submit" /> </form> welcome.php <?php if ($_POST['name'] && $_POST['age']) { echo "Welcome " . $_POST['name'] . "<br />"; echo "You are " . $_POST['age'] . " years old."; } ?>
  12. Can you show us your form? Forms by nature send their data to another page (or it could be the same page). To check whatever they entered, depending on whether you used a POST or GET method, it would be something along the lines of this: <?php if ($_GET['boxname']) { //However you wanna make a messagebox //Access the name by $_GET['boxname'] } ?> edit: oops forgot it was brackets, not parentheses
  13. How would you like to check? Do you want to check the file extension of the potential image or do you want to read some of the image header to check?
  14. This means that there is a password needed, and you are not supplying it. http://us3.php.net/mysql_connect
×
×
  • 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.