CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

View: 1926|Reply: 4

GoDaddy gdform.php

[Copy link]
Post time 20-9-2007 10:59 AM | Show all posts |Read mode
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

Use magic Report


ADVERTISEMENT


Post time 20-9-2007 11:36 AM | Show all posts

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

Use magic Report

 Author| Post time 20-9-2007 12:36 PM | Show all posts

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

Use magic Report

Post time 24-9-2007 07:52 AM | Show all posts

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:

  1. <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.
Reply

Use magic Report

 Author| Post time 24-9-2007 12:52 PM | Show all posts

Reply #4 0001's post

Thanks 0001 sbb bagi reply tu

Tapi malangnya aku dh ikut sumer step2 yg dia bagi tu. Aku gak dh wat
satu dummy Contact page n trai antar email...tapi still xleh gak.

Disebabkn frust sgt , aku pn terjumpa la website ni masa tgh googling:

http://www.mailmyform.com/

Service ni akan tolong kita send data dari form ke email.
Kirer data2 tu antar kt server diorang dulu, n pastu diorang antar kt email
kita plak. Senang, mudah n free. Saper2 korang yg ader masalah ngn form
mailer, aku rekomen bende ni sbg last resort
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT



 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

20-1-2025 03:12 PM GMT+8 , Processed in 0.051993 second(s), 18 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list