|
Allo allo,
Aku tgh wat satu website ni. kt page ContactUs, aku wat satu html form untuk user send comments or suggestion
ke email aku. Kalo dh pakai html form, kene la ader php script utk proses data ye tak. Tapi php script yg aku buat tu
xleh pakai n hosting suh pakai php script yg die bagi.
So aku nk tanyer, ader x saper2 yg pakai or penah pakai hosting GoDaddy (www.godaddy.com)? Kalo
penah, penah x korang guna gdform.php yg dia bagi utk send email via html form?
|
|
|
|
|
|
|
|
Reply #1 enfield's post
Why dont ko zip up gdform.php tu, upload ke sendspace and bagi download link sini. Aku cuba bukak tengok codes dia tu. |
|
|
|
|
|
|
|
Reply #2 0001's post
coding php tu aku paste kt sini je pn ok kot sbb x panjang sgt. By da way, ni
link help dr godaddy.com. http://help.godaddy.com/article. ... 510&topic_id=77
Php script dier camni:
<?php
$request_method = $_SERVER["REQUEST_METHOD"];
if($request_method == "GET")
{
$query_vars = $_GET;
}
elseif ($request_method == "POST")
{
$query_vars = $_POST;
}
reset($query_vars);
$t = date("U");
$fp = fopen("ssfm/gdform_$t","w");
while (list ($key, $val) = each ($query_vars))
{
fputs($fp,"<GDFORM_VARIABLE NAME=$key START>\n");
fputs($fp,"$val\n");
fputs($fp,"<GDFORM_VARIABLE NAME=$key END>\n");
if ($key == "redirect")
{
$landing_page = $val;
}
}
fclose($fp);
if ($landing_page != "")
{
header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
}
else
{
header("Location: http://".$_SERVER["HTTP_HOST"]."/");
}
?> |
|
|
|
|
|
|
|
Reply #3 enfield's post
Since ko ada kata ko dah buat form sebelum ni so aku assume ko dah tau bab tu so takyah aku nak citer camna nak buat dari mula.
Codes kat atas tu untuk parse jer apa orang type masuk 'form' ko tu. Apa ko buat is normal form tapi kat dalam form tu MESTI ada codes yang berikut:
- <form action="gdform.php" method="post">
Copy the Code
Apa ni will buat is bila visitor tu click jer Submit button, dia panggil script atas (gdform.php) tu yang akan baca and parse semua input and antar input tersebut ke email ko (yang ko dah set dalam account ko).
In order to use our PHP form-mailer, you must specify an email address where you want the contents of your form sent to.
To Specify the Email Address for the Form-Mailer
1. Log in to your Account Manager.
2. In the My Products section, select Hosting Account List.
3. Next to the hosting account you want to modify, click Open.
4. In the Content section of the Hosting Control Center, click the Form Mail icon.
5. Under the Forms Email Address section, type the email address you want to use with your form-mailer.
6. Click Continue.
7. Verify that this is the address you want to use with your form-mailer, and click Update.
Anyway help dia tu dah clear.
NOTE: Your file and GDFORM.PHP need to be placed in the same directory of your hosting account in order for the form to properly function.
Aku suggest ko buat a dummy 'contact us' page dulu... isi, then click submit and tengok ko dapat ke tidak email tu. Kalau dummy page tu still takleh guna, ko paste codes tu sini... aku cuba tolong tengok apa yg tak kena. |
|
|
|
|
|
|
| |
|