PHP + HTML , Wampserver
This shows how to
create a file upload form with PHP + HTML
<?php $db_con=mysqli_connect('localhost','root','','photos') or die("Connection error"); $form = '<form id="myfrom" enctype="multipart/form-data" method="POST" action="photoDB.php">'; $form .= 'Chose photos to Upload :'; $form .= '<input type="file" name="photoUp" accept="image/*" required/>'; $form .= '<p><button type="submit" value="upload ">Upload </button>'; $form .= '</form>'; ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> </head> <body style="background:#303030;"> <div id = "photoform" style="color:#fff;margin:20px 50px;" ><?php echo $form ; ?></div> </body> </html>
No comments:
Post a Comment