Friday, September 2, 2011

[web-design] PHP Help

 


Is it possible to get help with this bit of code? In advance I apologize if I didn't post this correctly.

Every time I change a line according to the error report the error goes to a different line. so after the last error I gave up. I'm still quite new at this and can't figure if it's a comma, semicolon,word,bracket,symbol.......or if I just screwed it all up LOL.

any help would be appreciated.
Thanks,
C

The last error said:

Parse error: syntax error, unexpected T_STRING in /home/content/68/7507768/html/webdesignsiteinsert1.php on line 27

Here is the code:
<html>
<head>
<link href="newwebsitestyles.css" rel="stylesheet"
type="text/css">
</head>
<body>
<?php
//Connect To Database
$hostname='webdesignsite.db.7507768.hostedresource.com';
$username='webdesignsite';
$password='your password';
$dbname='webdesignsite';
$usertable='your_tablename';
$yourfield = 'your_field';

mysql_connect
('173.201.88.135','webdesignsite','xxxx');
if (!$con)
{
die('Unable to connect to database! Please try

again later.');
}

mysql_select_db(webdesignsite);

$query = 'SELECT * FROM ' . Free Quote;
$result = mysql_query($query);
if($result) {
while($row = mysql_fetch_array($result)){
$name = $row[First Name, Last Name,

Company Name, Email, Username, Password, Brief

Description];
echo 'Name: ' . $name;
}
}

$query="INSERT INTO .Free Quote (First Name,

Last Name, Company Name, Email, Username,

Password, Brief Description)

VALUES
('$_POST[firstname]','$_POST

[lastname]','$_POST[companyname]','$_POST

[email]','$_POST[username]','$_POST

[password]','$_POST[briefdescription]')";

if (!mysql_query($sql,$con))

{
die('Error: ' . mysql_error());
}

echo "<center><b><h2>Your inquiry has been

received.<br/>'$_POST[firstname]'<br>
We look forward to your business!</h2></b>";

mysql_close($con);
?>

<p>

<a href="newwebsite1.html">home</a>

</body>

</html>

__._,_.___
Recent Activity:
---------------------------------------------------------------
web-design@yahoogroups.com is sponsored, owned, and founded by Technogypsie Designs (formerly Wandering Leaf Designs)
~etching your presence on the web  
leafworks@yahoo.com  

To unsubscribe or change your settings:
Please go to http://www.yahoogroups.com
- login, - choose group to modify, - change to unsubscribe,
web only, digest, or single post mode
By email: send a email from your email address receiving this
post to web-design-unsubscribe@yahoogroups.com
MARKETPLACE
A bad score is 598. A bad idea is not checking yours, at freecreditscore.com.

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

0 comments:

Post a Comment