Confusseeddd!!! PHP help

C++, C#, Java, PHP, ect...
Post Reply
User avatar
august
Posts: 21
Joined: Mon Apr 05, 2010 9:27 am

Confusseeddd!!! PHP help

Post by august »

Can anyone see where I'm going wrong ... it works fine from my home computer with the same database etc, but then when I take it to my other location, with the same database, exactly, it just doesnt work, starting to think i have made a slight error and just cant spot it?

Code: Select all

if ($outcome == "Sale")

{
	$insertsale="INSERT into sold (transferid, datasource, lastupdatedby, title, firstname, lastname, address1, postcode, homenumber, mobilenumber, worknumber, numberofcreditors, totaldebt, monthlypayments, debtinfo, struggling, bandc, carvaninsurance, gaselectricquote, outcome, transferedto, agent, results, notes, soldby) VALUES ('$transferid','$datasource','$repname','$title','$firstname','$lastname','$address1','$postcode','$homenumber','$mobilenumber','$worknumber','$numberofcreditors','$totaldebt','$monthlypayments','$debtinfo','$struggling','$bandc','$carvaninsurance','$gaselectricquote','$outcome','$transferedto','$agent','','','$soldby')";

mysql_query($insertsale) or die("Could not insert sale");

Code: Select all

<?php

echo "PHP kicks your ASP";

?>
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Confusseeddd!!! PHP help

Post by hallsofvallhalla »

what is the error you are getting?

Also you have insert into sold but I do not see a sold table..
User avatar
Chris
Posts: 1580
Joined: Wed Sep 30, 2009 7:22 pm

Re: Confusseeddd!!! PHP help

Post by Chris »

Try this:

Code: Select all

if ($outcome == "Sale")
{
   $insertsale="INSERT INTO `sold`
                       (`transferid`,
                     `datasource`,
                     `lastupdatedby`,
                     `title`,
                     `firstname`,
                     `lastname`,
                     `address1`,
                     `postcode`,
                     `homenumber`,
                     `mobilenumber`,
                     `worknumbe`r,
                     `numberofcreditors`,
                     `totaldebt`,
                     `monthlypayments`,
                     `debtinfo`,
                     `struggling`,
                     `bandc`,
                     `carvaninsurance`,
                     `gaselectricquote`,
                     `outcome`,
                     `transferedto`,
                     `agent`,
                     `results`,
                     `notes`,
                     `soldby` )
                    VALUES
                    ('$transferid',
                     '$datasource',
                     '$repname',
                     '$title',
                     '$firstname',
                     '$lastname',
                     '$address1',
                     '$postcode',
                     '$homenumber',
                     '$mobilenumber',
                     '$worknumber',
                     '$numberofcreditors',
                     '$totaldebt',
                     '$monthlypayments',
                     '$debtinfo',
                     '$struggling',
                     '$bandc',
                     '$carvaninsurance',
                     '$gaselectricquote',
                     '$outcome',
                     '$transferedto',
                     '$agent',
                     '',
                     '',
                     '$soldby')";

    mysql_query($insertsale) or die(mysql_error());
} 
 
Fighting for peace is declaring war on war. If you want peace be peaceful.
User avatar
KunoNoOni
Posts: 61
Joined: Sun May 09, 2010 1:54 am

Re: Confusseeddd!!! PHP help

Post by KunoNoOni »

hallsofvallhalla wrote:what is the error you are getting?

Also you have insert into sold but I do not see a sold table..

That's because we're looking inside the sold table.


-KunoNoOni
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Confusseeddd!!! PHP help

Post by hallsofvallhalla »

well that will teach me to skim a topic! I seriously need to spend more time reading posts. Dummy me.
Post Reply

Return to “Coding”