What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Form submit to PHP

Form submit to PHP
Author: Message:
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. Form submit to PHP
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">
[Image: top.gif]
03-08-2005 03:06 AM
Profile PM Web Find Quote Report
lopardo
Veteran Member
*****


Posts: 1395
Reputation: 33
37 / Male / Flag
Joined: Nov 2002
Status: Away
RE: Form submit to PHP
Take a look at this example.
[Image: userbar452797dd.gif]
03-08-2005 03:22 AM
Profile PM Find Quote Report
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. RE: Form submit to PHP
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);
[Image: top.gif]
03-08-2005 03:50 AM
Profile PM Web Find Quote Report
L. Coyote
Senior Member
****

Avatar
Captain Obvious

Posts: 981
Reputation: 49
38 / Male / Flag
Joined: Aug 2004
Status: Away
RE: Form submit to PHP
Try using simple quotes => '

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

Hack, hack, hack!
Finally became a Systems Analyst! :spam:

03-08-2005 03:54 AM
Profile PM Find Quote Report
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. RE: Form submit to PHP
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 $
[Image: top.gif]
03-08-2005 03:59 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On