Need Help with Contact Form and Newsletter

thanks so much for everything guys...... Now do you think there is a way to make the newsletter task work?

jharvey1029

Novice

Posts: 31

Loc: New Castle, PA

3+ Months Ago

you might want to look up the original posting with the same thread name as this and check out bigwebmaster's html code there.

garrett2828

Newbie

Posts: 6

3+ Months Ago

real quick..... how do i make the page route back to my home page etc. once you hit submit.... it is just taking me to a blank page with url as contact.php is there a way to change this? thanksGarrett

Bigwebmaster

Site Admin

Posts: 9105

Loc: Seattle, WA & Phoenix, AZ

3+ Months Ago

Glad you were able to get it to work with the new script James. Wish we could figure out what the actual problem was with your original script as that script still looks fine to me. I am sure there has to be some sort of logical problem to why it was not working. At least its working for you now!

was more to do with the php file than anything. Just not configured correctly.

I do have one thing you might be able to help with:

If I use the following: <input type="submit" value="Submit" name='submit'> the form submits redirects back to its original page (as directed to) and the email and EU data is received in email as planned.

However I dont like that grey boring submit button and want to use the buttons that you see on the page as of now. (will PM you a link to this page) only I cant seem to get the form to submit when the EU clicks "Send". It appears begins to process the php file but then stops and all I get is a blank screen.

Bigwebmaster

Site Admin

Posts: 9105

Loc: Seattle, WA & Phoenix, AZ

3+ Months Ago

It is not working because it is expecting the "submit" variable to be passed which it is no longer doing. Somewhere before the submit button you could add this to override that:

and then it would pass the submit variable through the form that your script is looking for.

Bigwebmaster

Site Admin

Posts: 9105

Loc: Seattle, WA & Phoenix, AZ

3+ Months Ago

By the way I think I just figured out why your original script was not working. It was driving me crazy, the problem ended up being your HTML, not the PHP script. In your HTML you had on your original script for the form element:

By default it would be using the GET method which means the variables in PHP would be accessed like so:

$_GET['variable']

instead of:

$_POST['variable']

Once you declare the method="post" then you could access via the $_POST variable in PHP.

Hopefully that helps for anybody who has this problem down the road with blank $_POST variables

jharvey1029

Novice

Posts: 31

Loc: New Castle, PA

3+ Months Ago

nope that doesn't work in fact now the button doesn't work at all.

any more ideas?

garrett2828

Newbie

Posts: 6

3+ Months Ago

Hey James,Could you send me your html code that you used that actually made it redirect back to your site like it was supposed to do, I did like Brian said but same results. I'm just wondering what you did to edit it and make the redirection work without trying to route to the contact.php file thanks againGarrett

Bigwebmaster

Site Admin

Posts: 9105

Loc: Seattle, WA & Phoenix, AZ

3+ Months Ago

Hi James - Took a look at your HTML, on your current script you are using you have JavaScript trying to search by ID and you have no ID specified on the form:

That should get rid of that JavaScript error I am receiving. See if that resolves anything, there may be further problems still after that.

jharvey1029

Novice

Posts: 31

Loc: New Castle, PA

3+ Months Ago

Garrett,

in the php file that I called contact.php look for header('Location:'); you will see a link to something like thank-you.html or something like that. change that to where you want it to be redirected to once the form has been sent.