Hi everyone, i need some help with the theory to complete my upload system.
Well i have two files, the first with html code and some php code and the last with all php code to upload the image, it is some like it:
File1.php
upload_image.phpPHP Code:<?php
require_once 'config.php';
?>
<!DOCTYPE html>
<html>
<head>
<script src="js/code.js"></script>
</head>
<body>
<form id="" action="upload_image.php" method="post" enctype="multipart/form-data" target="upload_target">
<div id="PhotoInsert">
<input id="file" type="file" name="file"/>
</div>
<div id="">
<input id="submit" type="submit" name="submit" value="Submit"/>
</div>
<iframe id="upload_target" name="upload_target" src=""></iframe>
</form>
</body>
</html>
Well the upload image is working, now i need to, when i upload the image to the database the upload_image.php return the image url to the iframe and then it will pass to a image src. it will work with ajax, i click on the button (submit) inside of the form and then it will run the upload_image.php code it will send the image to server and will return the image URL and now i dont know how i should do from here to the front, i want to return this URL get it and show that URL inside of a img tag that will be created using jquery. Any tips?PHP Code:Well this file have the code to upload image to database, it is working great.
Thanks community![]()


Reply With Quote
Bookmarks