View Single Post
  #2  
Old 10-15-2004, 06:36 AM
  jds580s's Avatar 
jds580s jds580s is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 38
 

Default

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'"); if (is_array($lists)) { foreach ($lists as $list) { db_query("INSERT INTO $sql_tbl[newslist_subscription] (listid, email, since_date) VALUES ('$list[listid]', '$email', '".time()."')"); } } else { func_header_location("/error_message.php?access_denied&id=58"); }

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!
__________________
animator for hire
onthez.com
------------------------
x-cart v4.0.5 Linux
_________________
Reply With Quote