Shoutbox

Form submit to PHP - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Form submit to PHP (/showthread.php?tid=39760)

Form submit to PHP by DJeX on 03-08-2005 at 03:06 AM

How would I go to php code after submitting a form in html?

I have this html from. Under it in the code on the same page is my php code that I want to execute when the form is submitted. What would I put in the "what to put here" to go to and execute the code:

code:
<form method="POST" action="what to put here" enctype="multipart/form-data">

RE: Form submit to PHP by lopardo on 03-08-2005 at 03:22 AM

Take a look at this example.


RE: Form submit to PHP by DJeX on 03-08-2005 at 03:50 AM

ok thanks lopardo i'll take a look at that.

I've come across antoher problem. When writeing php code to a file with php code how do you write the $varibles without them not being written.

like this:

code:
$file5 = fopen("sdata/$hits/$hits.php","w");
fwrite($file5,"<?php

$filenamesong50 = 'sdata/$hits/$hits.rev';
$html50 = '<table border='1' width='100%' id='table1' bordercolor='#000000' style='border-collapse: collapse'>
    <tr>
        <td>$rate /10</td>
    </tr>
    <tr>
        <td>$name</td>
    </tr>
    <tr>
        <td>$review</td>
    </tr>
</table>
<hr color='#000000'>\n';
$fp50 = fopen($filenamesong50, 'w');
fputs($fp50, $html50) or die('Could not open file!');
fclose($fp50);

?>");
fclose($file5);

RE: Form submit to PHP by L. Coyote on 03-08-2005 at 03:54 AM

Try using simple quotes => '

And espace the simple quotes with \ or use double quotes "


RE: Form submit to PHP by DJeX on 03-08-2005 at 03:59 AM

Humm I mean when i write the php to the file instead of writting:

$filenamesong50 = 'sdata/$hits/$hits.rev';

It will write:

= 'sdata/$hits/$hits.rev';


It don't write anthing that begins with $