Jump to content

[SOLVED] Ok so I rewrote my question/problem to make it more clear


prcollin

Recommended Posts

Basically i have a form and below it (on the code side not display side) i have an html document.  The variables in the html document are reflective of what is entered in the form

 

So say i have a text box <input type="text" name="title">

Then I set that $title = 'title'

IN the html portion of the form there is a place for the title of the site

 

<title> $title </title>

 

And the whole html document is refelctive of what the user enters. 

 

SO i have all that working and when they click submit it sends me an email with all of hte correct code and user inputs form the form.  Right now I have to take the code, place it in a notepad, save it as .html or .php then upload it to my server.

 

Is there an easy way to just have the new file created just post to the server as a .html or .php?  Each time a user signs up I want the new information to post to a new directory and save itself as a new .html or .php file

Link to comment
Share on other sites

mkdir(foldername to be created) makes the folder

you can trigger it on submission

 

if you want a file in the folder, make sure you keep the folder name

and just

$filetosave = fopen($folder.$filename,'w');
fclose($filetosave); 

 

to save it

and you're done

Link to comment
Share on other sites

mkdir(foldername to be created) makes the folder

you can trigger it on submission

 

if you want a file in the folder, make sure you keep the folder name

and just

$filetosave = fopen($folder.$filename,'w');
fclose($filetosave); 

 

to save it

and you're done

 

 

Thank you very much

Link to comment
Share on other sites

mkdir(foldername to be created) makes the folder

you can trigger it on submission

 

if you want a file in the folder, make sure you keep the folder name

and just

$filetosave = fopen($folder.$filename,'w');
fclose($filetosave); 

 

to save it

and you're done

 

one more question.  If there is no file with that name already in the directory it will just create a new one with it right?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.