RE: [PHP-DB] No data?

2012-07-26 Thread Brad
That would be a php.ini setting and I have no clue which [context] to look for 
my friend.

 

 

 

From: tamouse mailing lists [mailto:tamouse.li...@gmail.com] 
Sent: Thursday, July 26, 2012 4:11 PM
To: Brad
Subject: RE: [PHP-DB] No data?

 

I am sure the file is created. You need to look to see if MySQL can *read* the 
file. It *must* be world readable. Please look at permissions on *file* not 
directory.

On Jul 26, 2012 3:03 PM, "Brad"  wrote:

That is created via php. It would not create that filename of /tmp/thy152k 
(which becomes an actual file) unless it had the permissions.

An extensive hack could prove those but I am confident it is self explanatory.

 

 

Respectfully,
Brad

 

From: tamouse mailing lists [mailto:tamouse.li...@gmail.com] 
Sent: Thursday, July 26, 2012 1:13 PM
To: Brad
Subject: RE: [PHP-DB] No data?

 

That shows that the /tmp directory is world rwx. What about the actual temp 
file? 

On Jul 26, 2012 5:05 AM, "Brad"  wrote:

My brain went there in a hurry, hours ago my friend
http://tinypic.com/r/28mrm/6

now you should see why I am so confused
No error, but no data either. :(

Brad Sumrall
NYCTelecomm.com
212 444-2996  

-Original Message-
From: tamouse mailing lists [mailto:tamouse.li...@gmail.com]
Sent: Thursday, July 26, 2012 5:52 AM
To: Brad
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] No data?

In reading over LOAD DATA ... in the mysql reference. it makes particular note 
of the fact that the file it's reading must be completely world readable, 
including all paths to the file. In checking just now, I notice that a file 
uploaded by php and placed in /tmp is only readable by the server user (aka, 
www-data on some systems).

   "For security reasons, when reading text files located on the server, the 
files must either reside in the database directory or be readable by all."
<http://dev.mysql.com/doc/refman/5.1/en/load-data.html>

This tiny script shows what happens:

http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
file upload examplefile upload 
example

$_FILES

  


0) {
 $lscmd = 'ls -l '.$_FILES['userfile']['tmp_name'];
 echo 'ls -l tmp_name'.PHP_EOL;
 echo ''.`$lscmd`.''.PHP_EOL;
   }
?>




Send this file: 
 




When a file is submitted, this is the output:

file upload example
$_FILES

  array(1) {
  ["userfile"]=>
  array(5) {
["name"]=>
string(15) "testfile.txt"
["type"]=>
string(10) "text/plain"
["tmp_name"]=>
string(14) "/tmp/phphxGoQm"
["error"]=>
int(0)
["size"]=>
int(4244)
  }
}

ls -l tmp_name

-rw--- 1 www-data www-data 4244 Jul 26 04:41 /tmp/phphxGoQm

Send this file: 



RE: [PHP-DB] No data?

2012-07-26 Thread Brad
The sql query is sound. The tmp_file is created correctly and can be viewed 
live. It just does't hit the database.  :(


-Original Message-
From: tamouse mailing lists [mailto:tamouse.li...@gmail.com] 
Sent: Thursday, July 26, 2012 5:52 AM
To: Brad
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] No data?

In reading over LOAD DATA ... in the mysql reference. it makes particular note 
of the fact that the file it's reading must be completely world readable, 
including all paths to the file. In checking just now, I notice that a file 
uploaded by php and placed in /tmp is only readable by the server user (aka, 
www-data on some systems).

   "For security reasons, when reading text files located on the server, the 
files must either reside in the database directory or be readable by all."
<http://dev.mysql.com/doc/refman/5.1/en/load-data.html>

This tiny script shows what happens:

http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
file upload examplefile upload 
example

$_FILES

  


0) {
 $lscmd = 'ls -l '.$_FILES['userfile']['tmp_name'];
 echo 'ls -l tmp_name'.PHP_EOL;
 echo ''.`$lscmd`.''.PHP_EOL;
   }
?>




Send this file: 
 




When a file is submitted, this is the output:

file upload example
$_FILES

  array(1) {
  ["userfile"]=>
  array(5) {
["name"]=>
string(15) "testfile.txt"
["type"]=>
string(10) "text/plain"
["tmp_name"]=>
string(14) "/tmp/phphxGoQm"
["error"]=>
int(0)
["size"]=>
int(4244)
  }
}

ls -l tmp_name

-rw--- 1 www-data www-data 4244 Jul 26 04:41 /tmp/phphxGoQm

Send this file: 


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] No data?

2012-07-26 Thread Brad
My brain went there in a hurry, hours ago my friend
http://tinypic.com/r/28mrm/6

now you should see why I am so confused
No error, but no data either. :(

Brad Sumrall
NYCTelecomm.com
212 444-2996

-Original Message-
From: tamouse mailing lists [mailto:tamouse.li...@gmail.com] 
Sent: Thursday, July 26, 2012 5:52 AM
To: Brad
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] No data?

In reading over LOAD DATA ... in the mysql reference. it makes particular note 
of the fact that the file it's reading must be completely world readable, 
including all paths to the file. In checking just now, I notice that a file 
uploaded by php and placed in /tmp is only readable by the server user (aka, 
www-data on some systems).

   "For security reasons, when reading text files located on the server, the 
files must either reside in the database directory or be readable by all."
<http://dev.mysql.com/doc/refman/5.1/en/load-data.html>

This tiny script shows what happens:

http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
file upload examplefile upload 
example

$_FILES

  


0) {
 $lscmd = 'ls -l '.$_FILES['userfile']['tmp_name'];
 echo 'ls -l tmp_name'.PHP_EOL;
 echo ''.`$lscmd`.''.PHP_EOL;
   }
?>




Send this file: 
 




When a file is submitted, this is the output:

file upload example
$_FILES

  array(1) {
  ["userfile"]=>
  array(5) {
["name"]=>
string(15) "testfile.txt"
["type"]=>
string(10) "text/plain"
["tmp_name"]=>
string(14) "/tmp/phphxGoQm"
["error"]=>
int(0)
["size"]=>
int(4244)
  }
}

ls -l tmp_name

-rw--- 1 www-data www-data 4244 Jul 26 04:41 /tmp/phphxGoQm

Send this file: 


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] No data?

2012-07-25 Thread Brad
Note this var_dump

array(1) { ["file"]=> array(5) { ["name"]=> string(14) "emailsTest.txt"
["type"]=> string(10) "text/plain" ["tmp_name"]=> string(14)
"/tmp/phpOxqCnD" ["error"]=> int(0) ["size"]=> int(61) } } array(1) {
["file"]=> array(5) { ["name"]=> string(14) "emailsTest.txt" ["type"]=>
string(10) "text/plain" ["tmp_name"]=> string(14) "/tmp/phpOxqCnD"
["error"]=> int(0) ["size"]=> int(61) } } string(165) " LOAD DATA LOCAL
INFILE '/tmp/phpOxqCnD' INTO TABLE `3` FIELDS TERMINATED BY ',' OPTIONALLY
ENCLOSED BY '\'' LINES TERMINATED BY "\r\n" IGNORE 1 LINES" $sqlDuplicate
column name 'Array'


array(1) { ["file"]=> array(5) { ["name"]=> string(14) "emailsTest.txt"
is where my problem is.
On my line 8   ->  $fileData = $_FILES["file"]; if I switch it to 'name'
(like I am thinking it should be) I get an undefined variable error. With it
as 'file', I get no error but no data either.


Code:
*
 0)
{
echo "Return Code: " . $fileData['error'] . "";
}
else
{
dbConnect();
mysql_select_db('mailList') or die(mysql_error());
$tmp_name = $fileData["tmp_name"];
$presql = "CREATE TABLE IF NOT EXISTS `{$memberID}` (id MEDIUMINT
AUTO_INCREMENT PRIMARY KEY UNIQUE)";
$midsql = "ALTER TABLE `{$memberID}` ADD {$fileData} VARCHAR(60)";
$sql = <<

***

mysql> SHOW CREATE TABLE `3`;
+---+---

+
| Table | Create Table |
+---+---

+
| 3 | CREATE TABLE `3` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`Array` varchar(60) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 |
+---+---

+
1 row in set (0.00 sec)

mysql> SELECT * FROM `3`;
++---+
| id | Array |
++---+
| 1 | NULL |
| 2 | NULL |
| 3 | NULL |
| 4 | NULL |
| 5 | NULL |
| 6 | NULL |
| 7 | NULL |
| 8 | NULL |
| 9 | NULL |
| 10 | NULL |
| 11 | NULL |
| 12 | NULL |
++---+
12 rows in set (0.00 sec)

**

 

Brad



[PHP-DB] No data?

2012-07-25 Thread Brad
My code runs error free but no data actually makes it into the database?  ->
http://pastie.org/4333923  and it creates a second column called Array
(which isn't correct).  :(

I can see the temporary file being created but I can't see what I am doing
wrong. The second column is a red flag but I can't see what?



RE: [PHP-DB] No data being put into the DB

2004-03-04 Thread Hutchins, Richard
Yeah, I prefer the ... '".$_POST["varname"]."' ... syntax primarily because
of the way my editor (EditPlus) highlights the code. I tried the braces
syntax in EditPlus and it doesn't highlight the same way. I'll check out the
editors you guys (Jason and Jeffrey) use to see if I like them and maybe
I'll switch (especially if they're free :) ).

I'll admit, the whole quote-dot syntax thing is a bigger pain than the
braces syntax. But I'm not aware of any performance or security issues
related to the use of quote-dot notation. If there are any, I'd certainly
like to be made aware of them. However, I think it comes down to issues of
personal preference and the coding standards of your individual corporate
environment or client.

> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 03, 2004 10:09 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] No data being put into the DB
> 
> 
> On Thursday 04 March 2004 10:36, [EMAIL PROTECTED] wrote:
> 
> > >>IMO it is better to use the braces syntax:
> > >>"insert into show
> > >>values('','{$_POST['Accnt_name']}','{$_POST['acc_num']}', ...)"
> >
> > I'm not second guessing at all, just curious as to why?  Is 
> it less work on
> > the parser?
> > Do you find it cleaner? 
> 
> Consistent - items in arrays are always referenced by $array['item'].
> Clean - no jumping in and out of double-quotes
> 
> > I've often used Richard's method myself, for the
> > color coding that shows
> > in my editors(Ultraedit and VIM) when concatenating with . 
> , mainly for
> > readability...but have found myself, of late, using the 
> braces more...
> 
> The braces syntax highlights fine on Quanta.
> 
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications 
> Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-db
> --
> /*
> Never go to bed mad.  Stay up and fight.
>   -- Phyllis Diller, "Phyllis Diller's Housekeeping Hints"
> */
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] No data being put into the DB

2004-03-04 Thread Bruno Santos
Hello. I'm not sure, but, witch version of php are u using ?

replace all the instances of $_POST[varname] with

$HTTP_POST_VARS[' varname '] and see what happens !!!

Cheers

Robert Sossomon wrote:

I have a form:
http://www.garlandcnorris.com/registration_tradeShow.html
That then goes to this page:

$display_block = "";
$date_sub = date("mdY - H:i:s");
$addtocart = "insert into show
values('','$_POST[Accnt_name]','$_POST[acc_num]','$_POST[email]','$_POST
[auth_buyer]','$_POST[attend_1]','$_POST[attend_2]','$_POST[attend_3]','
$_POST[num_att]', '$date_sub')";
$result = mysql_query($addtocart);
mysql_close();
$error = mysql_error();
print "the query I just ran was: $addtocart";
print "the result I just ran was: $result";
print "the error I just ran was: $error";
$display_block = "";
$display_block .= "Thank you for registering for the Garland
C Norris 100 year Celebration Trade Show and
party!\n\nThe information you submitted on
$date_sub was:Account Name: $_POST[Accnt_name]Account Number:
$_POST[acc_num]Email Address: $_POST[email]Authorized Buyer:
$_POST[auth_buyer]Attendee: $_POST[attend_1]Attendee:
$_POST[attend_2]Attendee: $_POST[attend_3]# Attending Party:
$_POST[num_att]";
$sendto = "$_POST[email]";
$subject = "Registration Details";
$message = "Thank you for registering for the Garland C Norris 100 year
Celebration Trade Show and party! \n\n The information you submitted on
$date_sub was: \n Account Name: $_POST[Accnt_name] \n Account Number:
$_POST[acc_num] \n Email Address: $_POST[email] \n Authorized Buyer:
$_POST[auth_buyer]\nAttendee: $_POST[attend_1]\nAttendee:
$_POST[attend_2]\nAttendee: $_POST[attend_3]\n# Attending Party:
$_POST[num_att]";
$header = 'From: [EMAIL PROTECTED]';
mail($sendto, $subject, $message,$header);

$display_block .= "\nhttp://www.gcnorris.com/index3.html\";>Click Here to continue
through to the Garland C Norris Website. You should be receiving
an email shortly with the information you have just submitted.We
look forward to seeing you in May!";
?>


Thanks For Registering


rightmargin="0" marginwidth="0" marginheight="0" height="100%" width="100%"> This is the results: the query I just ran was: insert into show values('','robert\'s Test','123456','[EMAIL PROTECTED]','Robert','','','','69', '03032004 - 17:30:20') the result I just ran was: the error I just ran was: Thank you for registering for the Garland C Norris 100 year Celebration Trade Show and party! The information you submitted on 03032004 - 17:30:20 was: Account Name: robert\'s Test Account Number: 123456 Email Address: [EMAIL PROTECTED] Authorized Buyer: Robert Attendee: Attendee: Attendee: # Attending Party: 69 DB Table: Empty Field descriptions: CREATE TABLE `show` ( `id` int(11) NOT NULL default '0', `act_name` text, `acc_num` int(6) default '0', `email` text, `auth_buyer` text, `attend_1` text, `attend_2` text, `attend_3` text, `num_att` int(2) default NULL, `date_sub` text, PRIMARY KEY (`id`) ) TYPE=MyISAM; There are no errors in the php-error log, the mysql error log, the httpd error log, however there is NOTHING in my 'show' table right now and I should have about 80 things in there. Any thoughts?? I am at my wits end trying to figure out the goofy thing. I have counted the fields (10 for each) so I made doubly sure I have 10 fields in the DB table -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] No data being put into the DB

2004-03-03 Thread Jason Wong
On Thursday 04 March 2004 10:36, [EMAIL PROTECTED] wrote:

> >>IMO it is better to use the braces syntax:
> >>"insert into show
> >>values('','{$_POST['Accnt_name']}','{$_POST['acc_num']}', ...)"
>
> I'm not second guessing at all, just curious as to why?  Is it less work on
> the parser?
> Do you find it cleaner? 

Consistent - items in arrays are always referenced by $array['item'].
Clean - no jumping in and out of double-quotes

> I've often used Richard's method myself, for the
> color coding that shows
> in my editors(Ultraedit and VIM) when concatenating with . , mainly for
> readability...but have found myself, of late, using the braces more...

The braces syntax highlights fine on Quanta.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
/*
Never go to bed mad.  Stay up and fight.
-- Phyllis Diller, "Phyllis Diller's Housekeeping Hints"
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] No data being put into the DB

2004-03-03 Thread jeffrey_n_Dyke



On Thursday 04 March 2004 08:08, Rich Hutchins wrote:

> Oh, and, normally, you reference the variables like so:
$_POST["varname"].
> I typically use the following syntax:
>
> "INSERT INTO tablename
> VALUES('".$_POST["varone"]."','".$_POST["vartwo"]."');

>>IMO it is better to use the braces syntax:
>>"insert into show
>>values('','{$_POST['Accnt_name']}','{$_POST['acc_num']}', ...)"

I'm not second guessing at all, just curious as to why?  Is it less work on
the parser?
Do you find it cleaner?  I've often used Richard's method myself, for the
color coding that shows
in my editors(Ultraedit and VIM) when concatenating with . , mainly for
readability...but have found myself, of late, using the braces more...

Thanks
Jeff

> In your query you have omitted the quotes. Don't know if that causes
> problems, but echoing out $addtocart would show that anyway.

>>Also ...

> mysql_close();
> $error = mysql_error();

>>call mysql_error() before you close the connection.

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
/*
If you give Congress a chance to vote on both sides of an issue, it
will always do it.
 -- Les Aspin, D., Wisconsin
*/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] No data being put into the DB

2004-03-03 Thread Jason Wong
On Thursday 04 March 2004 08:08, Rich Hutchins wrote:

> Oh, and, normally, you reference the variables like so: $_POST["varname"].
> I typically use the following syntax:
>
> "INSERT INTO tablename
> VALUES('".$_POST["varone"]."','".$_POST["vartwo"]."');

IMO it is better to use the braces syntax:

"insert into show
values('','{$_POST['Accnt_name']}','{$_POST['acc_num']}', ...)"

> In your query you have omitted the quotes. Don't know if that causes
> problems, but echoing out $addtocart would show that anyway.

Also ...

> mysql_close();
> $error = mysql_error();

call mysql_error() before you close the connection.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
/*
If you give Congress a chance to vote on both sides of an issue, it
will always do it.
-- Les Aspin, D., Wisconsin
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] No data being put into the DB

2004-03-03 Thread Rich Hutchins
Robert,

I'm assuming that you have an open database connection and that you have
just omitted it from your post for convenience sake.

I'll keep looking at your code, but my first suggestion would be for you to
echo $addtocart before you submit it to the database. This will show you the
exact query string that is being sent. Maybe there's an error in there, but,
like I said, I'll keep looking.

Oh, and, normally, you reference the variables like so: $_POST["varname"]. I
typically use the following syntax:

"INSERT INTO tablename
VALUES('".$_POST["varone"]."','".$_POST["vartwo"]."');

In your query you have omitted the quotes. Don't know if that causes
problems, but echoing out $addtocart would show that anyway.

HTH
Rich

-Original Message-
From: Robert Sossomon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 03, 2004 5:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] No data being put into the DB


I have a form:
http://www.garlandcnorris.com/registration_tradeShow.html

That then goes to this page:

$display_block = "";
$date_sub = date("mdY - H:i:s");

$addtocart = "insert into show
values('','$_POST[Accnt_name]','$_POST[acc_num]','$_POST[email]','$_POST
[auth_buyer]','$_POST[attend_1]','$_POST[attend_2]','$_POST[attend_3]','
$_POST[num_att]', '$date_sub')";
$result = mysql_query($addtocart);
mysql_close();
$error = mysql_error();
print "the query I just ran was: $addtocart";
print "the result I just ran was: $result";
print "the error I just ran was: $error";


$display_block = "";
$display_block .= "Thank you for registering for the Garland
C Norris 100 year Celebration Trade Show and
party!\n\nThe information you submitted on
$date_sub was:Account Name: $_POST[Accnt_name]Account Number:
$_POST[acc_num]Email Address: $_POST[email]Authorized Buyer:
$_POST[auth_buyer]Attendee: $_POST[attend_1]Attendee:
$_POST[attend_2]Attendee: $_POST[attend_3]# Attending Party:
$_POST[num_att]";

$sendto = "$_POST[email]";
$subject = "Registration Details";
$message = "Thank you for registering for the Garland C Norris 100 year
Celebration Trade Show and party! \n\n The information you submitted on
$date_sub was: \n Account Name: $_POST[Accnt_name] \n Account Number:
$_POST[acc_num] \n Email Address: $_POST[email] \n Authorized Buyer:
$_POST[auth_buyer]\nAttendee: $_POST[attend_1]\nAttendee:
$_POST[attend_2]\nAttendee: $_POST[attend_3]\n# Attending Party:
$_POST[num_att]";
$header = 'From: [EMAIL PROTECTED]';

mail($sendto, $subject, $message,$header);

$display_block .= "\nhttp://www.gcnorris.com/index3.html\";>Click Here to continue
through to the Garland C Norris Website. You should be receiving
an email shortly with the information you have just submitted.We
look forward to seeing you in May!";


?>


Thanks For Registering

 <!--
 A{text-decoration:none}
 H{text-transform:capitalize}
 -->









This is the results:
the query I just ran was: insert into show values('','robert\'s
Test','123456','[EMAIL PROTECTED]','Robert','','','','69', '03032004 -
17:30:20')
the result I just ran was:
the error I just ran was:

Thank you for registering for the Garland C Norris 100 year Celebration
Trade Show and party!

The information you submitted on 03032004 - 17:30:20 was:
Account Name: robert\'s Test
Account Number: 123456
Email Address: [EMAIL PROTECTED]
Authorized Buyer: Robert
Attendee:
Attendee:
Attendee:
# Attending Party: 69

DB Table:
Empty

Field descriptions:
CREATE TABLE `show` (
  `id` int(11) NOT NULL default '0',
  `act_name` text,
  `acc_num` int(6) default '0',
  `email` text,
  `auth_buyer` text,
  `attend_1` text,
  `attend_2` text,
  `attend_3` text,
  `num_att` int(2) default NULL,
  `date_sub` text,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM;


There are no errors in the php-error log, the mysql error log, the httpd
error log, however there is NOTHING in my 'show' table right now and I
should have about 80 things in there.

Any thoughts??  I am at my wits end trying to figure out the goofy
thing.  I have counted the fields (10 for each) so I made doubly sure I
have 10 fields in the DB table

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] No data being put into the DB

2004-03-03 Thread Robert Sossomon
I have a form:
http://www.garlandcnorris.com/registration_tradeShow.html

That then goes to this page:

$display_block = "";
$date_sub = date("mdY - H:i:s");

$addtocart = "insert into show
values('','$_POST[Accnt_name]','$_POST[acc_num]','$_POST[email]','$_POST
[auth_buyer]','$_POST[attend_1]','$_POST[attend_2]','$_POST[attend_3]','
$_POST[num_att]', '$date_sub')";
$result = mysql_query($addtocart);
mysql_close();
$error = mysql_error();
print "the query I just ran was: $addtocart";
print "the result I just ran was: $result";
print "the error I just ran was: $error";


$display_block = "";
$display_block .= "Thank you for registering for the Garland
C Norris 100 year Celebration Trade Show and
party!\n\nThe information you submitted on
$date_sub was:Account Name: $_POST[Accnt_name]Account Number:
$_POST[acc_num]Email Address: $_POST[email]Authorized Buyer:
$_POST[auth_buyer]Attendee: $_POST[attend_1]Attendee:
$_POST[attend_2]Attendee: $_POST[attend_3]# Attending Party:
$_POST[num_att]";

$sendto = "$_POST[email]";
$subject = "Registration Details";
$message = "Thank you for registering for the Garland C Norris 100 year
Celebration Trade Show and party! \n\n The information you submitted on
$date_sub was: \n Account Name: $_POST[Accnt_name] \n Account Number:
$_POST[acc_num] \n Email Address: $_POST[email] \n Authorized Buyer:
$_POST[auth_buyer]\nAttendee: $_POST[attend_1]\nAttendee:
$_POST[attend_2]\nAttendee: $_POST[attend_3]\n# Attending Party:
$_POST[num_att]";
$header = 'From: [EMAIL PROTECTED]';

mail($sendto, $subject, $message,$header);

$display_block .= "\nhttp://www.gcnorris.com/index3.html\";>Click Here to continue
through to the Garland C Norris Website. You should be receiving
an email shortly with the information you have just submitted.We
look forward to seeing you in May!";


?>


Thanks For Registering

 









This is the results:
the query I just ran was: insert into show values('','robert\'s
Test','123456','[EMAIL PROTECTED]','Robert','','','','69', '03032004 -
17:30:20')
the result I just ran was: 
the error I just ran was: 

Thank you for registering for the Garland C Norris 100 year Celebration
Trade Show and party!

The information you submitted on 03032004 - 17:30:20 was:
Account Name: robert\'s Test
Account Number: 123456
Email Address: [EMAIL PROTECTED]
Authorized Buyer: Robert
Attendee: 
Attendee: 
Attendee: 
# Attending Party: 69

DB Table:
Empty

Field descriptions:
CREATE TABLE `show` (
  `id` int(11) NOT NULL default '0',
  `act_name` text,
  `acc_num` int(6) default '0',
  `email` text,
  `auth_buyer` text,
  `attend_1` text,
  `attend_2` text,
  `attend_3` text,
  `num_att` int(2) default NULL,
  `date_sub` text,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM;


There are no errors in the php-error log, the mysql error log, the httpd
error log, however there is NOTHING in my 'show' table right now and I
should have about 80 things in there.

Any thoughts??  I am at my wits end trying to figure out the goofy
thing.  I have counted the fields (10 for each) so I made doubly sure I
have 10 fields in the DB table

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php