Skip to content

Commit

Permalink
Added spaces after the comma separators in the INSERT statement. Wide…
Browse files Browse the repository at this point in the history
…ned <table> on submit page.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@12 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
John Richards committed Mar 11, 2003
1 parent e1cd33c commit 3a6cd4a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
echo "\t<tr>\n";
echo "\t\t<td>\n";
echo "\t\t\t<br />&nbsp;<br />\n";
echo "\t\t\t<table width='175' align='center' border='1' style='border-collapse: collapse' bordercolor='#111111'>\n";
echo "\t\t\t<table width='250' align='center' border='1' style='border-collapse: collapse' bordercolor='#111111'>\n";
echo "\t\t\t\t<tr>\n";
echo "\t\t\t\t\t<td colspan='2' align='center' bgcolor='#CCCCCC'>\n";
echo "\t\t\t\t\t\t<br /><b>Results are being submitted...<br /><br />\n";
Expand All @@ -264,19 +264,19 @@
$subquery = "INSERT INTO $surveytable ";
foreach ($insertarray as $value)
{
$col_name .= "," . substr($value, 1); //Strip off leadinf 'F'
$col_name .= ", " . substr($value, 1); //Add separator and strip off leading 'F'
if (get_magic_quotes_gpc()=="0")
{
$values .= ",'" . addcslashes($$value, "'") . "'";
$values .= ", '" . addcslashes($$value, "'") . "'";
}
else
{
$values .= ",'" . $$value . "'";
$values .= ", '" . $$value . "'";
}
//echo "$value<br />\n"; //Debugging info
}
$col_name = substr($col_name, 1); //Strip off inital comma
$values = substr($values, 1); //Strip off leading comma
$col_name = substr($col_name, 2); //Strip off first comma & space
$values = substr($values, 2); //Strip off first comma & space
$subquery .= "($col_name) VALUES ($values)";
//echo "<pre style='text-align: left'>$subquery</pre>\n"; //Debugging info

Expand Down

0 comments on commit 3a6cd4a

Please sign in to comment.