Jump to content

anticore

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

anticore's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. do i have a syntax error around here ? it just outputs a blank page.. [code]mysql_connect($host,$user,$pass) or die("COULD NOT CONNECT TO DB"); mysql_select_db($db) or die("COULD NOT SELECT DB"); //echo " connected ..."; //run query $query = "SELECT * FROM user_rides WHERE yearcat=".$_REQUEST['yearcat']; if ($r = mysql_query($query) or die(mysql_error()) { //print while ($row = mysql_fetch_array ($r)) {     print "{$row['name']}";      } else {die('error'); } [/code]
  2. nothing. I also tried add a } after the form echo i didnt close the statement i think but still nothing.
  3. Still nothing :( i changed it back tried ?add=1 and still nothing. Maybe I should take the form out of the if statement?
  4. I'm trying to create a system to store user rides in a table to create a simple gallery I've started coding it and this is what i got. [code] $db = mysql_connect ("$host", "$username", "$password"); mysql_select_db ("$databasename", $db); //Start add article if($action=="add") { //If they have entered data into the form, do this if($name||$year||$yearcat||$details||$image1||$image2||$image3||$image4||$smpic) { $insertIt=mysql_query("INSERT INTO $tablename (`name`, `year`, `yearcat`, `details`, `image1`, `image2`, `image3`, `image4`, `smpic`) VALUES ('$name', '$year', '$yearcat', '$details', '$image1', '$image2', '$image3', '$image4', '$smpic')",$db); } if($insertIt) { echo " <i>$name</i> has been successfully added<br>"; } else { echo "Sorry there has been an error, please try again<br>"; } } //give form else { echo" <form id=\"form1\" name=\"form1\" method=\"post\" action=\"$PHP_SELF\">   <label>Name   <input name=\"name\" type=\"text\" id=\"name\" maxlength=\"30\" />   </label>   <p>     <label>Year     <input name=\"year\" type=\"text\" id=\"year\" size=\"6\" maxlength=\"4\" />     </label>   </p>   <p>     <label>Year Catagory     <select name=\"yearcat\" id=\"yearcat\">       <option value=\"05up\">05up</option>       <option value=\"9904\">9904</option>       <option value=\"9498\">9498</option>       <option value=\"8793\">8793</option>       <option value=\"7986\">7986</option>       <option>Choose One</option>     </select>     </label>   </p>   <p>     <label>Details     <textarea name=\"details\" cols=\"40\" rows=\"6\" id=\"details\" maxlength=\"255\"></textarea>     </label>   </p>   <p>Locations of Images:</p>   <p>     <label>Image1     <input name=\"image1\" type=\"text\" id=\"image1\" />     </label>   </p>   <p>     <label>Image 2     <input name=\"image2\" type=\"text\" id=\"image2\" />     </label>   </p>   <p>     <label>Image 3     <input name=\"image3\" type=\"text\" id=\"image3\" />     </label>   </p>   <p>     <label>Image 4     <input name=\"image4\" type=\"text\" id=\"image4\" />     </label>   </p>   <p>     <label>Thumbnail Image     <input name=\"smpic\" type=\"text\" id=\"smpic\" />     </label> </p>   <p><input name=\"action\" type=\"hidden\" value=\"add\"> <input type=\"submit\" value=\"Add Article\"></p> </form> "; ?> [/code] i tried doing userride.php?add to test this and all i got was a blank page
  5. I dont want to make a thumbnail for each image. I am going to use the 'thumbnail' image for the listing page. lets say someone chooses the 1993-1998 catagory I want to have the list of the corresponding user 'rides' to come up Showing |ThumbnailImage| - User's Name (a link to show the cars details and images) |ThumbnailImage| - User's Name (a link to show the cars details and images) |ThumbnailImage| - User's Name (a link to show the cars details and images) and so on.
  6. image 1-4 are for inputing the locations of the images. the listing part of this will only show the thumbnail followed by the owner/name clicking on it will bring up a description followed by 4 pictures. should i just upload the images to the table? would that be complicated?
  7. i'm trying to create a simple gallery for my site. and i'm not sure on how to go about it. i'm designing my mysql table to look like id,name,year,yearsection,description,image1,image2,image3,image4,thumbnail yearsection is so that i can call all the images within year catagories i have already defined and the imageX are to store the locations of the images. i'm thinking i'm going to need a couple functions a listing function to list according to my year catagories showing a thumbnail and just a name a id function to load whatever image/name is chosen on the listing page with the describtion and images and an add/delete/modify. Is there something i'm forgetting? or is there a better way of doing this
×
×
  • 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.