I have been messing around with PHP for about a month now. Here is my issue. I need an auto dealer to be able to click a button I will call browse, it will open a window for him to browse through images on his machine, then he can upload it and it be stored in my DB.
Sound pretty easy huh, I am a dumbass and cant figure it out. Also it would be really cool if the files were limited to 200k or less.
Any help would be much appreciated.
Thanks a million in advance.
[edit]
I actually only need it to be able to upload to the server itself, becvuase then I can have the link include the image name and use GET_VARS to get the image name then do this
<img src="<?= $image ?>.jpg">
Correct?
Anyways, here is my script, it is for an auto dealer to enter all info on the vehicle and then upload an image and it all be saved to my DB.
<table width="80%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" background="images/shadowcar.jpg">
<tr>
<td height="475" width="100%" valign="center">
<table width="100%" height="231">
<tr>
<td><table width="100%" border="0">
<tr>
<td height="110"> <form name="postcar" method="post" action="post.php">
<table width="66%" border="0">
<tr>
<td width="43%"><strong><font size="2">Vehicle Identification Number:</font></strong></td>
<td width="57%"><input name="vin" type="text" id="vin" size="24" maxlength="36" style="background-color: transparent"></td>
</tr>
<tr>
<td><strong><font size="2">Vehicle Year:</font></strong></td>
<td><input name="year" type="text" id="year" size="24" maxlength="4" style="background-color: transparent"></td>
</tr>
<tr>
<td><font size="2"><strong>Vehicle Make:</strong></font></td>
<td><input name="make" type="text" id="make" size="24" maxlength="12" style="background-color: transparent"></td>
</tr>
<tr>
<td><strong><font size="2">Vehicle Model:</font></strong></td>
<td><input name="model" type="text" id="model" size="24" maxlength="24" style="background-color: transparent"></td>
</tr>
<tr>
<td><strong><font size="2">Vehicle Color:</font></strong></td>
<td><select name="color" id="color">
<option selected>Black</option>
<option>Blue</option>
<option>Red</option>
<option>Yellow</option>
<option>Gray</option>
<option>Green</option>
<option>Purple</option>
<option>Orange</option>
<option>White</option>
</select></td>
</tr>
<tr>
<td><strong><font size="2">Automatic/Standard:</font></strong></td>
<td><select name="transmission" id="transmission">
<option selected>Automatic</option>
<option>Standard</option>
</select></td>
</tr>
<tr>
<td><strong><font size="2">How many miles:</font></strong></td>
<td><input name="miles" type="text" id="miles" size="24" maxlength="6" style="background-color: transparent"></td>
</tr>
<tr>
<td><strong><font size="2">Price to customer:</font></strong></td>
<td><input name="price" type="text" id="price" size="24" maxlength="6" style="background-color: transparent"></td>
</tr>
<tr>
<td><strong><font size="2">Engine type:</font></strong></td>
<td><input name="engine" type="text" id="engine" size="24" maxlength="24" style="background-color: transparent"></td>
</tr>
<tr>
<td><font size="2"><strong>4WD FWD RWD:</strong></font></td>
<td><select name="select">
<option>4WD</option>
<option>FWD</option>
<option selected>RWD</option>
</select></td>
</tr><tr>
<td><strong><font size="2">How many doors::</font></strong></td>
<td>
<select name="select2">
<option>2 Door</option>
<option selected>4 Door</option>
<option>Hatchback</option>
</select></td>
</tr>
<tr>
<td><font size="2"><strong>Extra Specifications (CD, Sunroof..):</strong></font></td>
<td><input name="extras" type="text" id="extras" size="24" maxlength="249"></td>
</tr>
<tr>
<td><font size="2"><strong>Image of vehicle to upload:</strong></font></td>
<td><input name="image" type="text" id="image" size="24" maxlength="250">
<input name="Browse" type="button" id="Browse" value="Browse"></td>
</tr>
</table>
<table width="66%" border="0" align="left">
<tr>
<td width="43%"><left>
<input name="Reset" type="reset" id="Reset" value="Reset">
</left></td>
<td width="57%"><right><input name="submit" type="submit" id="submit2" value="Insert into Database"></right></td>
</tr>
</table>
<p align="left"><br>
</form>
<p> </p>
</td>
</tr>
</table></td>
</tr>
</table> </tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td height="50" colspan="2">
<div align="right">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="/images/bar3.gif" height="21">
</td>
</tr>
</table>