Jump to content

[SOLVED] Simple request


fredley

Recommended Posts

I normally make flash websites, and I use the in-built system for sending form data, which uses a php file. I have a large form to make, and need an html replica. I just need to know how to send the data from the html form to the php file I already have. Most online guides I have read rely on their own php files, I need to be able to use the same one, or at least output the same information (I have written a program to extract the data at the other end).

Thanks

Tom


[code]<?php

$i1 = $HTTP_POST_VARS['input1'];
$i2 = $HTTP_POST_VARS['input2'];
$i3 = $HTTP_POST_VARS['input3'];
$i4 = $HTTP_POST_VARS['input4'];
$i5 = $HTTP_POST_VARS['input5'];
...
...
$i48 = $HTTP_POST_VARS['input48'];
$i49 = $HTTP_POST_VARS['input49'];
$i50 = $HTTP_POST_VARS['input50'];


$message = stripslashes($message);

$sendTo = "[email protected]";
$subject = "Worker Application";

$msg_body = "%%var1%% $i1 %%var2%% $i2 %%var3%% $i3 %%var4%% $i4 %%var5%% $i5 %%var6%% $i6 %%var7%% $i7 %%var8%% $i8 %%var9%% $i9 %%var10%% $i10 %%var11%% $i11 %%var12%% $i12 %%var13%% $i13 %%var14%% $i14 %%var15%% $i15 ... ... %%var48%% $i48 %%var49%% $i49 %%var50% $i50";

$header_info = "From: ".$i1." <".$i2.">";

mail($sendTo, $subject, $msg_body, $header_info);

?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/30695-solved-simple-request/
Share on other sites

I'm not sure, I'm pretty new to all this. Is it just me or could Daniel0's code put things in different orders, depending on whether all fields were filled? What I really want to know is what to put into my HTML file, I know I have the <form method="POST" action=""> line, but I don't know how to get that to post to my php file.

Tom
Link to comment
https://forums.phpfreaks.com/topic/30695-solved-simple-request/#findComment-141659
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.