... mysql_select_db(".... database name....", $con);
$sql="UPDATE INTO Picks (Day, Month, Number, Competition, Sport, Country, .....
Working:
... mysql_select_db(".... database name....", $con);
$sql="INSERT INTO Picks (Day, Month, Number, Competition, Sport, Country, .....
----------------
2. I can't make work the output of the database data, anything I try I got this message when trying to view my page:
"Parse error: syntax error, unexpected T_STRING, expecting ']' in /home/... my username..../public_html/test/view1.php on line 83" :@
Now this is a total nonsense, because like you can see below, line 83 is in an area which is totally identical with the same areas (lines) from the previous output zones (these are the output form of 5 sports-picks, everything is totally identical in the 5 areas, just the names of the "rows" are different as you can see...).
And if the code is validated in those 2 lines what in the world is with this line?
I tried to make some crazy changes, but nothing works, and anyways everything looks 1000% correct!
I have no data what could break the PHP code, any other character in the database which is not a letter are the " : ", "+ " or " - " characters.
<?php
$con = mysql_connect("localhost","...my username...","my pasword");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("...database name...., $con);
$result = mysql_query("SELECT * FROM Picks");
while($row = mysql_fetch_array($result))
{
echo $row['Day'] . ",
" . $row['Month'] . "
" . $row['Number']; echo "</h7></b>***</font></div><br>";
echo " <table align='center' border='1' bordercolor='#c0c0c0' cellpadding='0' cellspacing='0' width='528' bgcolor='#ffffff'><tr><td>
<table align='center' border='0' cellpadding='0' cellspacing='0' width='96%' bgcolor='#ffffff'>
<tr><td><div class='descr'><p align='center'><br><h8>";
echo $row['Competition'] . " " . $row['Sport'] . " " . $row['Country'] . " " . $row['Time']; echo "</h8><br><h7>";
[B]echo $row['Team1'] . " " . $row['vs'] . " " . $row['Team2']; echo "<br>";[/B]
echo $row['Type']; echo "</h7> <b>"; echo $row['Pick'] . " " . $row['Spread'] . " " . $row['Odds'] . " " . $row['Units'];
echo "</b></font><br><br>";
echo "<h8>";
echo $row['Competition1'] . " " . $row['Sport1'] . " " . $row['Country1'] . " " . $row['Time1']; echo "</h8><br><h7>";
[B]echo $row['Team3'] . " " . $row['vs1'] . " " . $row['Team4']; echo "<br>";[/B]
echo $row['Type1']; echo "</h7> <b>"; echo $row['Pick1'] . " " . $row['Spread1'] . " " . $row['Odds1'] . " " . $row['Units1'];
echo "</b></font><br><br>";
echo "<h8>";
echo $row['Competition2'] . " " . $row['Sport2'] . " " . $row['Country2'] . " " . $row['Time2]; echo "</h8><br><h7>";
[B]echo $row['Team5'] . " " . $row['vs2'] . " " . $row['Team6']; echo "<br>";[/B]
echo $row['Type2']; echo "</h7> <b>"; echo $row['Pick2'] . " " . $row['Spread2'] . " " . $row['Odds2'] . " " . $row['Units2'];
echo "</b></font><br><br>";
echo "<h8>";
echo $row['Competition3'] . " " . $row['Sport3'] . " " . $row['Country3'] . " " . $row['Time3]; echo "</h8><br><h7>";
echo $row['Team7'] . " " . $row['vs3'] . " " . $row['Team8']; echo "<br>";
echo $row['Type3']; echo "</h7> <b>"; echo $row['Pick3'] . " " . $row['Spread3'] . " " . $row['Odds3'] . " " . $row['Units3'];
echo "</b></font><br><br>";
echo "<h8>";
echo $row['Competition4'] . " " . $row['Sport4'] . " " . $row['Country4'] . " " . $row['Time4']; echo "</h8><br><h7>";
echo $row['Team9'] . " " . $row['vs4'] . " " . $row['Team10']; echo "<br>";
echo $row['Type4']; echo "</h7> <b>"; echo $row['Pick4'] . " " . $row['Spread4'] . " " . $row['Odds4'] . " " . $row['Units4'];
echo "</b></font><br><br>";
}
mysql_close($con);
?>
Line 84 is in red bold, and the other 2 identical lines are in green bold.
I'm totally out of ideas how to solve these 2 problems.... :(