Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8153053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:53:41+00:00 2026-06-06T15:53:41+00:00

I have a form in html which runs a php script whitch inserts text

  • 0

I have a form in html which runs a php script whitch inserts text fields into a MySQL database. I use this database for creating user profiles but in the profiles i need also sound, video and pictures. Is there any script which creates a folder on the hardrive with the name i insert from the form and store the selected files in this folder and inserts the file path into the MySQL database?

Also i need to display them into a search result page and from the result page if i select a user i need to redirect me to a page wich displays the selected record whith it’s own photos, sound, video and text as a profile page or something like this.

here is the form:

<form action="process.php" method="post" >
    <label>Όνομα:</label> <input type="text" name="Fname" /><br/><br/>
    <label>Επώνυμο:</label> <input type="text" name="Sname" /><br/><br/>
    <label>Είδος:</label> <input type="text" name="Genre" /><br/><br/>
    <label>Είδικότητα:</label> <input type="text" name="Specialty" /><br/><br/>
    <label>Βιογραφικό:</label> <input type="text" name="Bio" /><br/><br/>
    <input type="submit" value="Καταχώρηση"/>
</form>

and here is the script:

<?php
$con = mysql_connect("localhost","root","root");
if (!$con)
{
  die('Could not connect: ' . mysql_error());
}

mysql_select_db("fasma", $con);

$sql="INSERT INTO artists2 (Fname, Sname, Genre, Specialty, Bio)
VALUES
('$_POST[Fname]','$_POST[Sname]','$_POST[Genre]','$_POST[Specialty]','$_POST[Bio]')";

if (!mysql_query($sql,$con))
{
  die('Error: ' . mysql_error());
}
echo "Registration Successful";

mysql_close($con);
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:53:44+00:00Added an answer on June 6, 2026 at 3:53 pm

    When it comes to finding PHP functions, you should always check the PHP manual: http://php.net/manual/en/index.php

    It has great documentation on PHP’s functions, including how to create folders/directories on your server.

    As for uploading and storing files, it’s easier than you thnk:
    First, in your form, you need input fields of the type “file”. For example:

    <label>Photo:</label> <input type="file" name="uploadImage" id="file" /><br/><br/>
    

    Once the form is submitted to process.php, this will upload the file to a temporary location on your server. In process.php, the file and the temporary location can be accessed like so:

    $_FILES["file"]["tmp_name"];
    

    You can then copy the file to any location on your server that you like. And since you are the one who decides where the file will be copied to, you can insert the file path into your database as you see fit.

    For more information, check out: http://www.w3schools.com/php/php_file_upload.asp

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an html form which inserts data into a database. I just built
I have just a basic html form within index.php which contains two text fields:
I have a post html form, and the action is index.php, which is the
I have an HTML form which consists of several fieldsets (each has identical fields).
I have a HTML form which submits the data to a cgi-bin script which
I have a html form which have a select list box from which you
I have this html form which has options: <tr> <td width=30 height=35><font size=3>*List:</td> <td
I have a HTML form which allows a user to add rows ad hoc
I have a html form for uploading a file, which is as follows: $uploadhtml
I have a webrequest that returns a html response which has form inside with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.