Help - Search - Members - Calendar
Full Version: Advanced PHP people.. PLEASE PLEASE PLEASE help.
OpenSourcePhoto > World Wide Web > Website Stuff
Bethany Gilbert
Hey guys,

I am LOST. I know nothing about php - enough about html to understand the basic point. Anyway, I have a form on my website that I can't get to work because Godaddy requires that it "points" to their gdform.php file that they provide. I have no idea how to make it do that. They describe how to do it with HTML:

To Use the PHP Form-Mailer
1. Create your Web form as normal and assign unique names to your form items.
NOTE: Keep in mind that our form-mailer script will sort the names of your form items alphabetically when it composes the email message. This is the order of precedence: uppercase letters, lowercase letters, numbers.
2. For the form action line, enter gdform.php. For example:
<form action="gdform.php" method="post">
3. Set the form method to "post."
4. In addtion to the fields you create in your form, there are three special fields that you can use: subject, redirect, and email.
Subject. Controls the subject line in the form email.
Redirect. Controls the page that your visitors will see after they submit the form.
Email. Controls the return address for the form email.
For example:
<form action="gdform.php" method="post">
<input type="hidden" name="subject" value="Form Submission" />
<input type="hidden" name="redirect" value="thankyou.html" />
<p>First Name:<input type="text" name="FirstName" /></p>
<p>Last Name:<input type="text" name="LastName" /></p>
<p>E-Mail:<input type="text" name="email" /></p>
<p>Comments:<textarea name="comments" cols="40" rows="10">
Type comments here.</textarea></p>
<input type="submit" name="submit" value="submit"/>
</form>
5. Save and upload your file to your hosting account.



BUT - my file is php .. and I didn't make it. My web guy doesn't know how to do it either.

This is what my php file looks like:

<p>&nbsp;</p>
<?

$to = "bethany@bethanygilbert.com";
$subject = "$email\n\n";
$msg = "$name\n\n";
$msg .= "$message\n\n";
$msg .= "$tele\n\n";

mail($to, $subject, $msg, "From: BethanyGilbertPhotography\nReply-To: $email\n");

?>

Any help is much much much much much appreciated. I'm about to pull my hair out at this point and Godaddy is next to useless.

Thanks!
Bethany
ScottyP
edit: I just sent you a test email on from your website. let me know if you received it.
Jillian Kay
hi bethany

the godaddy example is what to do if you have an HTML site. you have a flash site it looks like. the code that you show is what the godaddy file will replace.


i'd contact godaddy for a flash example. smile.gif
Bethany Gilbert
Godaddy is basically useless in this situation. I am just so stressed. I'm worried that a bride or someone will try to send me something and i will never receive it etc. Do you guys know how to do that action thing in php? smile.gif

I didn't receive anything btw.

b
Jillian Kay
what do you mean by "action" thing. i know php, but not flash. smile.gif

what file is your code like this in

QUOTE
<p>&nbsp;</p>
<?

$to = "bethany@bethanygilbert.com";
$subject = "$email\n\n";
$msg = "$name\n\n";
$msg .= "$message\n\n";
$msg .= "$tele\n\n";

mail($to, $subject, $msg, "From: BethanyGilbertPhotography\nReply-To: $email\n");

?>


if nothing else is in that file, try renaming the gdform.php to the same name as that file. your web designer will also need to change the name of the fields to match the names provided in the godaddy example. if he didn't write it, you may need to contact the company that did. smile.gif

Bethany Gilbert
umm.. that is the form.php file for the flash page. sad.gif The gdform.php is supposed to process the websites form.php file. Is this making any sense? So I have to make the php file know to go to the gdform.php file to be processed.

Lol.. I sound like a lunatic. I am so stressed out! sad.gif

Thanks for trying!
b
ScottyP
OK...not sure if this will work but since the form isn't currently working, I guess this won't break anything.

Go to the GoDaddy site/ and click on Hosting and Servers | My Hosting Account.

1. Log in to your Account Manager.
2. Under the Hosting & Email section, select Hosting Account List.
3. Next to the hosting account you want to modify, click Open.
4. Under the Content section of the Hosting Manager, click the Form Mail icon.
5. Under the Forms Email Address section, type the email address you want to use with your form-mailer (i.e. your email address).
6. Click Continue.
7. Verify that this is the address you want to use with your form-mailer, and click Update.

In theory, this should update the gdform.php with your email address so the form email should actually go somewhere. Post back here when you've done this and I'll send a test email.

Bethany Gilbert
I had already done this when you sent the other test. sad.gif

Thanks For Trying.
b
Jillian Kay
web forms have two parts:

1. the html/flash form.
- it has the text boxes, and each text box has a unique name in the code
- it has an attribute called "action"
- action points to the php file that the data from the boxes should be sent to when the user clicks on the "submit" button

2. the php file that processes the data
- it reads the data using the unique name each one is given.
- it sends the email


that's it. since in godaddy's example, they say "action=gdform.php" then i know for certain that the gdform.php is supposed to replace your form.php file. since godaddy didn't give you a long link to the file "action=http://godaddy/..../etc/gdform.php" then that means that you *must* have the gdform.php on your local drive. so they must give you that file.

now, the name of the file doesn't matter, just the content, so if you rename your gdform.php to form.php & have your designer rename the text boxes so they match what godaddy's php is expecting, then you should be ok. smile.gif

sorry they aren't helping you much!

ScottyP
So I guess you are saying that the Bludomain template comes with form.php to send email and GoDaddy will only let you use gdform.php to send email. So...you need a way to connect form.php to gdform.php. (I'm sure you already stated this but it's waaay past my bed time). Surely, someone on here has a Bludomain template hosted on GoDaddy. You may want to change the thread title (or create a new one)...something like "Anyone use GoDaddy to host a Bludomain template?" and post your .php issue in the body.

edit: yeah, what jillian said. You may want to copy the existing gdform.php to a local drive before you go renaming it. Once you have a backup copy, rename the existing gdform.php on your server to form.php which is what the bludomain template is looking for.
Bethany Gilbert
This is the gdform

<?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");

$file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t;
$fp = fopen($file,"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"]."/");
}


?>


??? I still have no idea. I called Godaddy and they don't know either. Sooo.. it looks like i'm switching hosting pretty soon. sad.gif

Scott,

My site is not a bludomain site.. it is just very similar. I liked one of their designs but wanted a lot of changes they couldn't do. SO... the problem continues. smile.gif

b
ScottyP
Obviously you can read the contents of gdform.php. Can you rename the gdform.php since you have access to it? And switching hosting servers may not work if you have to use their supplied .php form too. You'd be in the same boat only with a different hosting company.

QUOTE(Bethany Gilbert @ February 12 2007, 11:38 PM) [snapback]76310[/snapback]
Scott,

My site is not a bludomain site.. it is just very similar. I liked one of their designs but wanted a lot of changes they couldn't do. SO... the problem continues. smile.gif


It looks almost exactly like the one I almost purchased. Sorry about the mix up.
Bethany Gilbert
Its a Godaddy only thing. Its something to do with their server. I will definately email you my stuff though.

smile.gif

thanks!
b
Bethany Gilbert
YAY! Eric fixed it! YOU ARE AWESOME!

Thanks so much!
b
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.