Jump to content

Sheets

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Sheets's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I did and it makes no sense to me what so ever help noobs
  2. I have a button that updates a field when it reloads the page however i would like it to run a function to store a value then update the field without reloading the page. Thank you for your time
  3. $sql = "SELECT id, reason, picture FROM posted WHERE id BETWEEN $set_min AND $set_max"; //query string $result = mysql_query($sql) or die (mysql_error()); // run a single query only once, show error on failure while ($row=mysql_fetch_assoc($result)){ //run through the results using $row array to address returned fields by field name //your code start $reason = $row[reason]; $pulled_id = $row[id]; $pulled_pic22 = $row[picture]; $href_pull = "<a href=" . "search.php?id=" . "$pulled_id" .">"; echo "<td>" . $href_pull . "<img src=$pulled_pic22 height=200 width=150 />" . "</td>"; //your code end }//job done it works exactly like i want! thank you for your help!
  4. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' AND 36' at line 1 Trying to fix myself ill let you know, but if you know how to fix feel free to reply
  5. basically there are no ids with the ones in between
  6. That is the only way i know how to. 0.o but obviously it is not working. I am trying to pull the pictures out of the database, set it up so it forwards to search.php with the id that it has. however if you went to the link i posted you see there are 3 images then at the far right there is another one. It is pulling all the in between ids that are not in the database. I know there are better ways etc.. but this is all i know how at the moment. function get_min() { $min = mysql_query("SELECT MIN(id) FROM posted"); $query_min = mysql_fetch_array($min); $min_min = $query_min[0]; return $min_min; } function get_max() { $max = mysql_query("SELECT MAX(id) FROM posted"); $query_max = mysql_fetch_array($max); $max_max = $query_max[0]; return $max_max; }
  7. id: 20 Reason: this is a test id: 21 Reason: Tests id: 22 Reason: Lolcatz id: Reason: id: Reason: id: Reason: id: Reason: id: Reason: id: Reason: id: Reason: id: Reason: id: Reason: id: Reason: id: Reason: id: Reason: id: Reason: id: 36 Reason: Test As you can see on the 2nd code box there are id's 20,21,22 and 36 in the database the rest are not active in the database. i am using using for to pull out the id that starts with the lowest value in the database, and only have it run until it gets to the maximum value. for ($id=$set_min; $set_max<=7; $id++) { // $id=$set_min is pulling the smallest value and $set_max is pulling the maximum value so it stops after it gets to 36 $query=mysql_query("SELECT * FROM posted WHERE id = $id"); $query_row=mysql_fetch_array($query); $reason = $query_row[reason]; $pulled_id = $query_row[id]; $pulled_pic22 = $query_row[picture]; $href_pull = "<a href=" . "search.php?id=" . "$id" .">"; echo "<td>" . $href_pull . "<img src=$pulled_pic22 height=200 width=150 />" . "</td>"; } how would i make it so i do not pull the values 23-35 which are not in the active database. Example: http://dev.hackmuch.com/of-the-day/search.php?id=36
  8. <?php // In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead // of $_FILES. $uploaddir = '/var/www/uploads/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); echo '<pre>'; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "Possible file upload attack!\n"; } echo 'Here is some more debugging info:'; print_r($_FILES); print "</pre>"; ?> I do not understand exactly what it is doing and why. :-\
  9. oh no of course i didnt do that of course........ /sarcasm it does not explain it
  10. The way you are using will only show the input boxes and will not email them. To create a "Click HERE to email me" use the following code: Click <a href=mailto:austinmaroney@live.com>here</a> to email me The way you are using requires a bit of php on the side, but here is a outline on creating the HTML side of the form: <form action="send_mail.php" method='POST' encrypt='text/html'> <table> <tr> <td>Bobba Name:</td> <td><input type="text" name="bobba_name"></td> </tr> <tr> <td>Your Name:</td> <td><input type="text" name="your_name"></td> </tr> <tr> <td>Your Age:</td> <td><input type="text" name="your_age"></td> </tr> <tr> <td>Your Email:</td> <td><input type="text" name="your_email"></td> </tr> <tr> <td>Why you?:</td> <td><input type="text" name="why_you"></td> </tr> </table> <center><input type="submit" value="Submit"></center> </form> If there is a spelling issue, my bad ;P
  11. I am learning the basics of php starting with simple login system, basic encryption etc... I saw this site around and i finally decided to make an account! Thank you Sheets
  12. Hello, i am making a very simple site to test how much i have learned. However i realized i need to simple it down and make it easier for the client side. Could anybody provide me with a link to a good tutorial where it shows how to upload a image to a certain directory then take that link and insert it into my database. Thank you for your time
×
×
  • 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.