I'm creating a complex Contact form generator website. I know how to do everything except this one thing. For the user on my website to create a form they have to fill out another form asking questions such as how many questions are on your form..... But at the end of the form I give them this

<form action="Some Page" method="POST" />
<input type="text" ...... />

That's all great but the form action, "some page", doesn't work because I have no idea how to automatically create a form action .php page and insert php code into it!

Recommended Answers

All 2 Replies

fopen, fwrite, fclose or file_put_contents would do it.

It would be very insecure and your site will mostly be compromised but you can try it anyway.

commented: Great goob smart php programmer! +0

hi dear,
here the code for you

<?php
$result="<?php echo'hello';?>";
$fp = fopen('data.php', 'w');
fwrite($fp, $result);

?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.