uoload image i a form

VapiSoft
VapiSoft used Ask the Experts™
on
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?
Comment
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?

Author

Commented:
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
Commented:
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:
http://extensions.joomla.org/extensions/edition/custom-code-in-content/1023

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...
<?php

//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?

http://www.rsjoomla.com/customer-support/forum/37-rsform-pro/13421-how-do-i-insert-an-image-into-a-form.html

Author

Commented:
Thaks

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