Jump to content

netpants

Members
  • Posts

    70
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

netpants's Achievements

Member

Member (2/5)

0

Reputation

  1. I am getting this error. Warning: gethostbyaddr() [function.gethostbyaddr]: Address is not a valid IPv4 or IPv6 address in /home/mobsters/public_html/signup.php on line 312 This is line 312 in signup.php $host=gethostbyaddr("$REMOTE_ADDR"); What could the problem be??? Thanks in advance for your help.
  2. Great thanks everyone. Now to find a php programmer I could do it myself probably but it would take mee wayyyyyy to long heh.
  3. Hmm Thanks Chris... So when I setup a form for people to upload a image or file or whatever ... it needs to take the file size and format and store it so it can look into the database for the exact match... So me.gif would be the uploaded file someone uploaded it took the name from the file name then its looking at the file size and Selecting from the database where the file size matches something in the size table ...am i right?
  4. Hi there, Please see my example below. I want to be able to go to a page and upload an image. Now when the image is upload php if possible will check the file size and format and create something based on that. Heres an example.... I upload a 124kb .gif image. The script recognizes the size and .gif images and produces lets say a unique smiley face or story character based on the size and file format. Of course it would not be totally unique as I would have to put in however many storys depending on the size so....if max file size is 1024 kb then I would have to create 1024 different storys times however many different file formats I have. So the system would see in the database oohh file size 112 kb .gif is this story or smiley and print it. Hope I explained it, as I am going to create a unique RPG game, where instead of someone creating a guy themselves they simple create a little image and upload it to get a unique monster or character. They could then build on the guy all based on what kind of images or files they upload. So lots of fun seeing what kind of guy they can come up with uploading different images or file types. Please let me know. Thanks
  5. Great, thanks then I think what I have already will work just fine then.
  6. There are eventually going to be over 91,000 entries into the database, so I thought by dividing it up into different tables it would make it a little faster when someone searches the database. Eatch of the counties has its own field, there is a field called county in my table.
  7. so the easiest thing to do would be to create a different form for eatch of the counties?
  8. I need to know how to write an if statement. For example I have a form dropdown called Cook, and Kendall, if someone selects Cook it will look in a certain table in the database, or if someone chooses Kendall it will look in a different table. Heres what I have currently it only works from one table. $result = mysql_query("SELECT * FROM coords WHERE city='$city' AND county='$county' AND street='$street'") What do I need to put in there for the if statement to say if $county == Cook then search in a different table that I will create. I will eventually have 7 different counties I will need to put if statements for.
  9. It doesnt matter about the javascript as it will be in an administration area, not user area. Thanks guys/gals
  10. I just want to be sure about the redirect. I have a form called insert.html and it posts to insertguts.php , the insertguts page doesnt display anything, but after it enters the information from the form i want it to redirect. I have tried before but it redirects before it enters the information into the database. How can I fix this please. // connect and select the database $conn = mysql_connect($host, $user, $password) or die(mysql_error()); $db = mysql_select_db($dbName, $conn) or die(mysql_error()); if (isset($_POST['newCity']) && trim($_POST['newCity']) != '') { // for easier variable handling... $newCity = $_POST['newCity']; $newCounty = $_POST['newCounty']; $newNumber = $_POST['newNumber']; $newStreet = $_POST['newStreet']; $newSfx = $_POST['newSfx']; $newCp = $_POST['newCp']; $newCoordinates = $_POST['newCoordinates']; $newZip = $_POST['newZip']; // insert new entry into database $sql = "insert into coords (county,city,number,street,sfx,cp,coordinates,zip) values ('$newCounty','$newCity','$newNumber','$newStreet','$newSfx','$newCp','$newCoordinates','$newZip')"; $result = mysql_query($sql, $conn) or die(mysql_error()); } // end if new entry posted // select all the entries from the table $sql = "select city from coords"; $result = mysql_query($sql, $conn) or die(mysql_error()); ?>
  11. Thank you!! and thanks for the explanation on how it works. I am a realy novice at php and mysql and every little bit of knowledge helps.
  12. Ok guys I have read the tutorial on how to do this but it was not working correctly with the way I have things displayed. Can anyone let me know on how to do this with the way I have my code setup. To see the sciprt in action www.onlineproxysite.com/coords/search.html County: Kendall , City: Aurora , Street: Canyon Creek , Suffix: Court . Thanks for your help in advance. <?php // connect and select the database $conn = mysql_connect($host, $user, $password) or die(mysql_error()); $db = mysql_select_db($dbName, $conn) or die(mysql_error()); $county = $_POST['county']; $city = $_POST['city']; $street = $_POST['street']; $zip= $_POST['zip']; $cp = $_POST['cp']; $sfx = $_POST['sfx']; // Insert a row of information into the table "example" $result = mysql_query("SELECT * FROM coords WHERE street LIKE '$street%' AND city='$city' AND county='$county' AND sfx='$sfx'") or die(mysql_error()); echo "<table border='1'>"; echo "<tr> <th>County</th><th>City</th><th>Block #</th><th>Address</th><th></th><th>Coordinates</th> </tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<tr><td>"; echo $row['county']; echo "</td><td>"; echo $row['city']; echo "</td><td>"; echo $row['number']; echo "</td><td>"; echo $row['street']; echo "</td><td>"; echo $row['sfx']; echo "</td><td>"; echo $row['coordinates']; echo "</td></tr>"; } ?>
  13. Yes but how do i incorporate it where the syntax would be correct
  14. this is what I did and it seemed to work, i just wont get similar stuff to whatever is entered in the street name filed. $result = mysql_query("SELECT * FROM coords WHERE street='$street' AND city='$city' AND county='$county' AND sfx='$sfx'") or die(mysql_error());
×
×
  • 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.