uoload image i a form

VapiSoft used Ask the Experts™
I have a form component (RS form).
I have an "upload file" that only enable me to browse.
I want to load the picture an show it inside the form.
How do I do it?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
How do you mean to show it in form?


Now I understand that when i clicked on Submit it sent the file to the MySQL.
So now I want to show it to the user.
something like <img src="the picture's url
IT Manager
First of all, do you have any extension installed that allows you to write custom PHP pages?

If you don't, you will need to get something installed.  I prefer Jumi.  You can find it here:

Secondly, if you do have a PHP coding extension installed you will need to create a custom PHP page that will query your database and get the file location from the table you put it in.

Once you get that information then you can put it into the <img> tag.  It's going to look something like the code below:

If you need further assistance please send me how you have your tables setup and how/where you would like to show you image to the user...etc...

//This query is completely based on how you setup your database.
$query = mysql_query("SELECT imgloc FROM imageStore where imgNum = $imgNum");
while ($row = mysql_fetch_array($query))
$imgloc = $row['imgloc'];
echo "<img src='".$imgloc."' />";

Open in new window

of you are just looking ofr the url . in your file manager or through FTP find the image name in media/images foder and check its properties and display the image using html img tag.

more explained here
How do I insert an image into a form?



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial