Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
i've posted this before, but doing it again to see if i can get some more help than last time
i'm writing a PHP script with MS Access 2000 as backend database
i'm having a problem inserting data in the DB.here is what i'm doing
$abc = $HTTP_POST_VARS("data1");
$def = $HTTP_POST_VARS("data2");$sql = "INSERT INTO DB_TABLE ('Table Col 1', 'Table Col 2') Values ('$abc',
'$def')";odbc_exec($odbc, $sql);
where $odbc is the connection to the database and its successful
the problem is that if you look at the attributes Table Col 1 and Table Col
2...you'll notice the spaces..and cuz of that the Insert command does not
worki've tried variations of single quote and double quote...but no help
i would changed the Attribute to be a signle word, but their is another
application written in C++ uses the same database...and i don't have the
source code for iti'm using PHP 4.2.3
any help or suggestion are really appreciated
thanks
-Clicker

Just letting you know that I'm not ignoring you (don't know about the others), it's just that I have no idea what the problem is. Maybe that's why nobody was posting an answer.

I'm not ignorin' ya either :)
I hammered on your inquiry on the first pass... my guess was the ' vs the " but you have since tested for that factor.
I'm not sure about the multi-word feature you are trying to find a workaround for. If it is not too much of a task, i would suggest correcting the database to a single word fieldname, then modifying the C++ code... it may be as easy as a search and replace... just a thought.
Infinite Recursion

thanks for the replies
I would modify the C++ code but i don't have it.
Its a propritory software by a thrid company that uses Access as a backend DB. So if i went ahead and made a single word out of the attributes the $3000 software becomes compeletely useless
looks like i'll have to leave PHP and look into JSP or ASP to help me with this
thanks for everything

Hi! I've been on php for one day so this may be of the roof but in my book I read that
$abc = $HTTP_POST_VARS("data1");
$def = $HTTP_POST_VARS("data2");is for php versions earlier than 4.1.x. Can´t u use $_POST instead? (Thats the new name for HTTP_POST_VARS)
Niklas

![]() |
POP before SMTP
|
Advice on digital logic c...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |