bodyland Posted December 17, 2006 Share Posted December 17, 2006 [size=8pt]<?phpinclude ("mysql.php");include ("menu.html");$girlid = $_GET['id'] ;$name = $_GET['name'] ;$inputgirlid = $_POST['id'] ;$inputname = $_POST['name'] ;$inputprofession = $_POST['profession'] ;$inputethnicity = $_POST['ethnicity'] ;$inputorigin = $_POST['origin'] ;$inputprovstate = $_POST['provstate'] ;$inputbirthplace = $_POST['birth_place'] ;$inputbirthday = $_POST['birthday'] ;$inputaliases = $_POST['aliases'] ;$inputactive = $_POST['active'] ;$inputeyecolor = $_POST['eye_color'] ;$inputhaircolor = $_POST['hair_color'] ;$inputheight = $_POST['height'] ;$inputweight = $_POST['weight'] ;$inputmeasurements = $_POST['measurements'] ;$inputtatoos = $_POST['tatoos'] ;$inputpiercings = $_POST['piercings'] ;$inputwebsite = $_POST['website'] ;$inputvideos = $_POST['videos'] ;if ($inputname != '') {mysql_query("INSERT INTO bio (girl,name,profession,ethnicity,origin,provstate,birth_place,birthday,aliases,active,eye_color,hair_color,height,weight,measurements,tatoos,piercings,website,videos) VALUES ('$inputgirlid','$inputname','$inputprofession','$inputethnicity','$inputorigin','$inputprovstate','$inputbirthplace','$inputbirthday','$inputaliases','$inputactive','$inputeyecolor','$inputhaircolor','$inputheight','$inputweight','$inputmeasurements','$inputtatoos','$inputpiercings','$inputwebsite','$inputvideos')");echo "<center>I added: <b>$inputname</b>'s bio<br><br></center>";}echo "<center><font size=+2 color=red>Bio for: $name</font><br><font size=2>girl ID $girlid</font></center>";echo "<table border=1 cellspacing=0 cellpadding=5 align=center>";$name = str_replace(' ','%20',$name);$sql=@mysql_query("select name,profession,ethnicity,origin,provstate,birth_place,birthday,aliases,active,eye_color,hair_color,height,weight,measurements,tatoos,piercings,website,videos from bio where girl=$girlid ");while ($tmp=@mysql_fetch_array($sql)){ extract($tmp);echo "<tr><td>Name: </td><td><b>$name</b></td></tr><tr><td>Profession: </td><td><b>$profession</b></td></tr><tr><td>Ethnicity: </td><td><b>$ethnicity</b></td></tr><tr><td>Country of Origin: </td><td><b>$origin</b></td></tr><tr><td>Province or State: </td><td><b>$provstate</b></td></tr><tr><td>Birth Place: </td><td><b>$birth_place</b></td></tr><tr><td>Birth Date: </td><td><b>$birthday</b></td></tr><tr><td>Aliases: </td><td><b>$aliases</b></td></tr><tr><td>Years active: </td><td><b>$active</b></td></tr><tr><td>Eye Color: </td><td><b>$eye_color</b></td></tr><tr><td>Hair Color: </td><td><b>$hair_color</b></td></tr><tr><td>Height: </td><td><b>$height</b></td></tr><tr><td>Weight: </td><td><b>$weight</b></td></tr><tr><td>Measurements: </td><td><b>$measurements</b></td></tr><tr><td>Tattoos: </td><td><b>$tatoos</b></td></tr><tr><td>Piercings: </td><td><b>$piercings</b></td></tr><tr><td>Website: </td><td><b>$website</b></td></tr><tr><td>Video Link: </td><td><b>$videos</b></td></tr>";}echo "</table><br><br>";?><center><table border=0 cellspacing=0 cellpadding=0><tr><td><form action = bio.php?&girl=<? echo $girlid ?>&name=<? echo $name ?> method = post></td></tr><tr> <td align=center colspan=2 height=30><font face=arial size=3><b>Add a bio below:</b></td></tr><tr><td align=center>name:</td><td align=center><input type = text name=name value='' size = 57 ></td></tr><tr><td align=center>ID:</td><td align=center><input type = text name=id value='' size = 57 ></td></tr><tr><td align=center>profession:</td><td align=center><input type = text name=profession value='' size = 57 ></td></tr><tr><td align=center>ethnicity:</td><td align=center><input type = text name=ethnicity value='' size = 57 ></td></tr><tr><td align=center>country of origin:</td><td align=center><input type = text name=origin value='' size = 57 ></td></tr><tr><td align=center>prov/state:</td><td align=center><input type = text name=provstate value='' size = 57 ></td></tr><tr><td align=center>birth place:</td><td align=center><input type = text name=birth_place value='' size = 57 ></td></tr><tr><td align=center>birth date:</td><td align=center><input type = text name=birthday value='' size = 57 ></td></tr><tr><td align=center>aliases:</td><td align=center><input type = text name=aliases value='' size = 57 ></td></tr><tr><td align=center>active:</td><td align=center><input type = text name=active value='' size = 57 ></td></tr><tr><td align=center>eye color:</td><td align=center><input type = text name=eye_color value='' size = 57 ></td></tr><tr><td align=center>hair color:</td><td align=center><input type = text name=hair_color value='' size = 57 ></td></tr><tr><td align=center>height:</td><td align=center><input type = text name=height value='' size = 57 ></td></tr><tr><td align=center>weight:</td><td align=center><input type = text name=weight value='' size = 57 ></td></tr><tr><td align=center>measurements:</td><td align=center><input type = text name=measurements value='' size = 57 ></td></tr><tr><td align=center>tattoos:</td><td align=center><input type = text name=tatoos value='' size = 57 ></td></tr><tr><td align=center>piercings:</td><td align=center><input type = text name=piercings value='' size = 57 ></td></tr><tr><td align=center>website:</td><td align=center><input type = text name=website value='' size = 57 ></td></tr><tr><td align=center>videos:</td><td align=center><input type = text name=videos value='' size = 57 ></td></tr><tr><td align=center colspan=2><input type=submit name=submit value="Do it, Do it."></td></form></tr></table></center>[/size] This is a code I've been working on. I want it setup so that the dynamic URL that gets me here enters the first 2 entries of the field. Namely ID and name. It doesn't work like it's setup now. Everything else is fine. The code uploads like I want, I just have to put those first 2 entries in manually, when I should be able to get it from the URL. Thanks for the help Quote Link to comment Share on other sites More sharing options...
SharkBait Posted December 17, 2006 Share Posted December 17, 2006 [code]<input type="text" name="name=" value="<?php if(isset($_GET['name'])) echo $_GET['name'];?>" />[/code]Would put the name from the URL into the form field for the name Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.