View Full Version : Help script to save input file in a specified file folder

11-07-2010, 02:38 AM
here is my html code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<form id="form1" name="form1" method="post" action="">
<label for="name3">Name: </label>
<input type="text" name="name" id="name3" />
<label for="phone">Phone Number</label>
<input type="text" name="phone" id="phone" />
<label for="ticket">Ticket Number</label>
<input type="text" name="ticket" id="ticket" />
<label for="issue">Issue:</label>
<select name="issue" id="issue">
<option value="no sync">no sync</option>
<option value="no route">no route</option>
<option value="resched">resched</option>
<option value="cancel">cancel</option>
<label for="category">Category:</label>
<select name="category" id="category">
<option value="level 1">level 1</option>
<option value="level 2">level 2</option>
<option value="level 3">level 3</option>
<div><input type="file" name="upload" id="upload" />
<label for="summary">Summary:</label>
<textarea name="summary" id="summary" cols="45" rows="5"></textarea>
<input type="submit" name="submit" id="submit" value="Submit" />
<input type="submit" name="preview" id="preview" value="Review" />
<input type="submit" name="clear" id="clear" value="Clear" />

if someone can help with this. what i would like to do is when i click on SUBMIT button, all the information input in the form will be save in a folder as an html file depending on which category it is. for example it will be save in "C:\Users\owner\Documents\New Folder" so all the level1 category will be save in one html file, level 2 in one html file and level3 in one html file. if there is an uploaded jpeg file it will be displayed inside the html file as well.

pls HELP! (im not sure if the script i need is php or js):(

11-07-2010, 05:08 PM
It would be PHP, but I think you're going to need some sort of database
to keep track of levels? Normally, you would be saving the data in a
database, and PHP would display whatever "page" you want, based on level.
There would not be any "new folders" or .html files ... it would by dynamically
generated by PHP. This website you're viewing now is an example of that.
There are no HTML web pages ... each page you see is made by a PHP script.
The information you see is taken from a database, and displayed depending on
the codes you see in the URL (web page address).