![]() |
news letter subscription, getting 404
I am editing news.tpl and getting a 404 error when a user trys to subscribe.
Code:
<FORM action="{$xcart_web_dir}/mail/subscribe.php" name="subscribeform"> I left the original submit button in there until everything is working, but it gives the same error. The 404 is looking for the error page /xcart/mail/error_message.php instead of just in the /xcart folder but I'm not sure exactly where the error is. Any help would be appreciated. |
ok, perhaps this is more code related than template, I'm not sure.
It seems in the file mail/subscribe.php everything is being processed fine until about 1/2 way into that file. The logic looks something like get email from form if email is valid continue if email doesn't all ready exist in the database continue add email to database send notification email to customer send notification email to admin If I plug in an invalid email it works fine and lets me know if I plug in an existing email it works fine and lets me know If I enter a new email address it gives the error Here is the php (this is unmodified code) Code:
$lists = func_query("SELECT * FROM $sql_tbl[newslists] WHERE avail='Y' AND show_as_news='Y'"); This is what seems to be tripping it up. I'm not sure what the issue is. Using phpMyAdmin I can see that the table exists and has the one test email I put in there from the admin page. Thanks! |
Wow I am no php guy at all, I just know a very little, but was able to figure it out.
It was wanting Available = yes and Show as News = yes In admin I don't want it to show as news so I just needed to delete that from the PHP as well. Problem resolved! |
A few months old but exactly what I was looking for!
Got the subscribing working again, thanks to you jds!! :D :D :D |
All times are GMT -8. The time now is 11:42 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.