Jump to content

prallen

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

prallen's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the reply, Thats not it though, I must have accidentally put a space in when i C&Ped it... Any more Ideas?
  2. okay, my table looks something like this ID UniqueID FileName 1 nCSoHUaDMz nCSoHUaDMz.jpg 2 XXXXXXXXXX XXXXXXXXXX.jpg 3 XXXXXXXXXX XXXXXXXXXX.jpg I am trying to get the FileName based on the UniqueID. This is what I am trying: ShowRandomPic(); function ShowRandomPic(){ mysql_connect("localhost", "db_user", "db_password") or die ('Error: ' . mysql_error()); mysql_select_db ("db_pictures"); $sql = "SELECT * FROM table Where UniqueID = 'nCSoHUaDMz'"; $result = mysql_query($sql); $row = mysql_fetch_array($result); $filename = $row['FileName']; print $filename; } Nothing is outputting, any Ideas or suggestions? Thanks a lot, Pat
  3. EDIT: Nevermind, it works with static text.. I must have done something wrong while retrieving UniqueID.
  4. One more thing if possible... how can my form submit 2 variables within its $_POST array? i put this within my <form> tags but it does not seem to be working <?php print "<input type = \"hidden\" name = \"UniqueID\" value = \"".$UniqueID."\">"; ?>
  5. Thanks a lot man, worked like a charm. What i'm actually going to do to show the picture and its rating is include a second variable $picID in the $_POST. Then i'm going to have an if statemtent EX: if ($_POST != '') with a function that will lookup the information on the picture id based on $picID. Thankss
  6. Alright thanks a lot I'm gonna try some of that stuff right now. I've been doing some work with php and mysql... for a few years... just kind of playing around though.
  7. thanks for trying to help lupld. I see stuff like that when i look at source code for other websites. the only problem is i need the page to refresh, show a new random picture, update the ratings to the db, and then show the previous picture in the upper left corner of the page. How would i go about updating the database and refreshing the page with the previous picture information?
  8. Just as the title says, I am creating an image rating system - somewhat like hotornot.com. I have 10 radiobuttons numbered 1-10 and i need them to submit their own value using $_POST when one of the radio buttons is clicked. I'm not sure how to go about this... I see a lot of sites like this using Javascript. Is there any way around using javascript? what can I do? prallen is online now Add to prallen's Reputation Report Post Reply With Quote
×
×
  • 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.