Hello:

I'm trying to figure out what exactly is causing this error:

Parse error: syntax error, unexpected T_STRING in D:\Hosting\7528136\html\request_confirmation.php on line 463

this is my code:

<?php
ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);

//error_reporting(0);
//error_reporting(E_ERROR | E_WARNING | E_PARSE);
if ( isset ( $_POST['submit'] ) ) //If submit is hit
{

//here were are making a connection to autotechpro.net
//mysql_connect("******","****","*****");
//mysql_select_db("autotec6_client_accounts")or die( "<p><span style=\"color: red;\">Unable to select database</span></p>");


// define each variable
//transaction details
$tx_id=mysql_real_escape_string($_POST['tx_id']);
$tx_time=mysql_real_escape_string($_POST['tx_time']);
$account_plan=mysql_real_escape_string($_POST['account_plan']);
$plan_term=mysql_real_escape_string($_POST['plan_term']);
$plan_cost=mysql_real_escape_string($_POST['plan_cost']);
//costumer details
$fname= mysql_real_escape_string($_POST['fname']);
$lname= mysql_real_escape_string($_POST['lname']);
$company= mysql_real_escape_string($_POST['company']);
$address= mysql_real_escape_string($_POST['address']);
$city= mysql_real_escape_string($_POST['city']);
$state= mysql_real_escape_string($_POST['state']);
$zip= mysql_real_escape_string($_POST['zip']);
$wphone=mysql_real_escape_string($_POST['wphone']);
$wphone1=mysql_real_escape_string($_POST['wphone1']);
$wphone2=mysql_real_escape_string($_POST['wphone2']);
$mphone=mysql_real_escape_string($_POST['mphone']);
$mphone1=mysql_real_escape_string($_POST['mphone1']);
$mphone2=mysql_real_escape_string($_POST['mphone2']);
$fax=mysql_real_escape_string($_POST['fax']);
$fax1=mysql_real_escape_string($_POST['fax1']);
$fax2=mysql_real_escape_string($_POST['fax2']);
$email=mysql_real_escape_string($_POST['email']);
$website=mysql_real_escape_string($_POST['website']);
$detailedmsg=mysql_real_escape_string($_POST['detailedmsg']);
$work_phone=$wphone."-".$wphone1."-".$wphone2;
$mobile_phone=$mphone."-".$mphone1."-".$mphone2;
$fax_number=$fax."-".$fax1."-".$fax2;
$edit_servicearea=mysql_real_escape_string($_POST['edit_servicearea']);
$edit_servicearea_str=implode(",",$edit_servicearea);
$servicesoffered="<br/>"."$edit_servicearea_str<br/>\n$detailedmsg<br/>;


$sql=("INSERT users SET fname='$fname', lname='$lname', dba='$company', address='$address', city='$city', state='$state', zip='$zip',work_phone='$work_phone', mobile_phone='$mobile_phone', fax='$fax_number',email='$email', website='$website', services='$servicesoffered', trans_id='$tx_id', trans_time='$tx_time', acct_plan='$account_plan', term='$plan_term', cost='$plan_cost'");
if (mysql_query ($sql)) { 
  
echo"
......./success message
";

line 463 is: " if (mysql_query ($sql)) { ", therefore, presumably, the error is within the sql insert statement. But I fail to catch the error.

May I request a another observation?

Thanks,
Mossa

You're missing an ending double-quote here.

$servicesoffered="<br/>"."$edit_servicearea_str<br/>\n$detailedmsg<br/>;

You're missing an ending double-quote here.

$servicesoffered="<br/>"."$edit_servicearea_str<br/>\n$detailedmsg<br/>;

Great, thanks buddy!

Mossa

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.