Jump to content

tvanmaren

Member
  • Posts

    6
  • Joined

  • Last visited

tvanmaren's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. tvanmaren

    What changed?

    I would say it is a general problem except some are getting through and some aren't, that was why I was guessing it might be a browser issue. The emails are all sent from the same place. The code is pretty basic. Nothing crazy or original. Still a mystery. I'll probably just have to do some rewriting to improve the functionality.
  2. tvanmaren

    What changed?

    So, I have a basic shopping cart set up which has been running with no problems for about a month. Recently something changed so that sometimes it doesn't work, and I can't figure out why. Basically, info is put into a database, the customer is redirected to the payment gateway (authorize.net). Once we have a successful payment, the customer is redirected to a thank you page which has php script to email the database info to our office. Recently, we haven't been getting some of the emails. The information is still stored in the database, but the php isn't sending the email? My only thoughts are that possibly different browsers blocking the page from redirecting or php from running once it goes there. Did some security feature change recently with a major browser that would block this? Any other thoughts? Thanks! Tim
  3. tvanmaren

    Select query

    I'm trying to insert a variable into my SELECT query. Is there something I'm missing with this? $invoice = mysql_insert_id(); $result = mysql_query ("SELECT * FROM applicant WHERE invoice = $invoice"); Everything works when I put a value instead of the variable $invoice, but want the query run on the last updated row. Is there another way to do this? Thanks!
  4. Seriously, it's not something I can't find, I think it's something I'm not understanding. I'm copying the format I found from the ZEND PHP 101 tutorial. I don't see what I'm missing. I'll keep messing with it I guess.
  5. Hi all. This is my first programming in PHP, but I keep getting syntax error when trying to use INSERT INTO ... VALUES. Here's the code. <?php ini_set('display_errors', 'On'); error_reporting(E_ALL | E_STRICT); /* server info */ $server = 'localhost'; $user = 'root'; $password = ''; $database = 'cart'; /* get variables */ $name_last1 = $_POST['name_last1']; $name_first1 = $_POST['name_first1']; $name_mi1 = $_POST['name_mi1']; $gender1 = $_POST['gender1']; $birthdate1 = $_POST['birthdate1']; $ssn1 = $_POST['ssn1']; $name_last2 = $_POST['name_last2']; $name_first2 = $_POST['name_first2']; $name_mi2 = $_POST['name_mi2']; $gender2 = $_POST['gender2']; $birthdate2 = $_POST['birthdate2']; $ssn2 = $_POST['ssn2']; $name_last3 = $_POST['name_last3']; $name_first3 = $_POST['name_first3']; $name_mi3 = $_POST['name_mi3']; $gender3 = $_POST['gender3']; $birthdate3 = $_POST['birthdate3']; $ssn3 = $_POST['ssn3']; $name_last4 = $_POST['name_last4']; $name_first4 = $_POST['name_first4']; $name_mi4 = $_POST['name_mi4']; $gender4 = $_POST['gender4']; $birthdate4 = $_POST['birthdate4']; $ssn4 = $_POST['ssn4']; $name_last5 = $_POST['name_last5']; $name_first5 = $_POST['name_first5']; $name_mi5 = $_POST['name_mi5']; $gender5 = $_POST['gender5']; $birthdate5 = $_POST['birthdate5']; $ssn5 = $_POST['ssn5']; $name_last6 = $_POST['name_last6']; $name_first6 = $_POST['name_first6']; $name_mi6 = $_POST['name_mi6']; $gender6 = $_POST['gender6']; $birthdate6 = $_POST['birthdate6']; $ssn6 = $_POST['ssn6']; $street = $_POST['street']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $email = $_POST['email']; $home_phone = $_POST['home_phone']; $insurance = $_POST['insurance']; $policy = $_POST['policy']; $group = $_POST['group']; /* server and database connection */ $my_connection = mysql_connect($server, $user, $password); if(!$my_connection) { die('Could not connect to server:' . mysql_error()); } echo 'Connected successfully to $server. <br><br>'; mysql_select_db ($database, $my_connection) or die ( 'Couldn\'t open $database: ' . mysql_error() ); echo 'Connected successfully to $database.'; /* Add to database */ $query = " INSERT INTO applicant ( name_last1, name_first1, name_mi1, gender1, birthdate1, ssn1, name_last2, name_first2, name_mi2, gender2, birthdate2, ssn2, name_last3, name_first3, name_mi3, gender3, birthdate3, ssn3, name_last4, name_first4, name_mi4, gender4, birthdate4, ssn4, name_last5, name_first5, name_mi5, gender5, birthdate5, ssn5, name_last6, name_first6, name_mi6, gender6, birthdate6, ssn6, street, city, state, zip, email, home_phone, insurance, policy, group ) VALUES ( '$name_last1' , '$name_first1', '$name_mi1', '$gender1', '$birthdate1', '$ssn1', '$name_last2', '$name_first2', '$name_mi2', '$gender2', '$birthdate2', '$ssn2', '$name_last3', '$name_first3', '$name_mi3', '$gender3', '$birthdate3', '$ssn3', '$name_last4', '$name_first4', '$name_mi4', '$gender4', '$birthdate4', '$ssn4', '$name_last5', '$name_first5', '$name_mi5', '$gender5', '$birthdate5', '$ssn5', '$name_last6', '$name_first6', '$name_mi6', '$gender6', '$birthdate6', '$ssn6', '$street', '$city', '$state', '$zip', '$email', '$home_phone', '$insurance', '$policy', '$group') " ; $result = mysql_query ($query) or die ( "Error in query: $query. " . mysql_error() ); echo "<br><br>New record inserted with ID ".mysql_insert_id(); mysql_close ($my_connection); ?> and the error: Connected successfully to $server. Connected successfully to $database.Error in query: INSERT INTO applicant ( name_last1, name_first1, name_mi1, gender1, birthdate1, ssn1, name_last2, name_first2, name_mi2, gender2, birthdate2, ssn2, name_last3, name_first3, name_mi3, gender3, birthdate3, ssn3, name_last4, name_first4, name_mi4, gender4, birthdate4, ssn4, name_last5, name_first5, name_mi5, gender5, birthdate5, ssn5, name_last6, name_first6, name_mi6, gender6, birthdate6, ssn6, street, city, state, zip, email, home_phone, insurance, policy, group ) VALUES ( 'V' , 'T', 'p', 'M', '', '', '', '', 'a', 'F', '', '', '', '', '', ' ', '', '', '', '', '', ' ', '', '', '', '', '', ' ', '', '', '', '', '', 'M', '', '', '', '', '', '', '', '', '', '', '') . You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group ) VALUES ( 'V' , 'T', 'p', 'M', '', '', '' at line 1 Any suggestions? Thanks!
  6. Hello! I need some help setting up an online signup for an ambulance service membership. Until now, we have been taking membership information along with credit cards through a form secured with SSL, then manually inputting the credit cards at the office. We have a merchant account and payment gateway (authorize.net). I've tried using Zen Cart for the membership purchase, but I need to collect more information from the customer than just billing information, i.e. family member names, birth dates, insurance information, etc. I have a good base in html/css, but that's the extent of my knowledge. Ideally, I'd like to just use a form, store the membership information until the transaction is complete, then have that information with the confirmed payment emailed to be put into the membership database. Any other suggestions would be great! Thanks!
×
×
  • Create New...