RE: [PHP] Re: ASP to PHP language problems

2004-03-10 Thread Sam Masiello
Since I am assuming "Type" is a text field, you will want to enclose it in single quotes. Also, because I am anal retentive, I like to also use the addslashes() function on any input coming in on the GET string or via a POST. Also, since all variables are preceded by a $ character, your call to

RE: [PHP] Re: ASP to PHP language problems

2004-03-10 Thread Sam Masiello
Not trying to sound rude or anything, but have you looked up the mysql functions at http://php.net/mysql in your research? I would start with mysql_connect(), mysql_query(), and mysql_fetch_array()/mysql_result(). There are lots of user notes on each page as well which should be of assistance.

Re: [PHP] Re: ASP to PHP language problems

2004-03-10 Thread Alistair Hayward
This is what I have: $connection = mysql_connect("localhost","root","batman"); if (!$connection) { echo "Couldn't make a connection!"; exit; } $db = mysql_select_db("sealhouse", $connection); if (!$db) { echo "Couldn't select database!";

Re: [PHP] Re: ASP to PHP language problems

2004-03-10 Thread Alistair Hayward
Thanks Chris, Believe me, I have been doing research non-stop for a few days now and this is my last resort. The problem is the language. I can't find what I'm looking for on the net because I don't know what it's called. I have worked out how to create a connection to a mySQL server and datab

RE: [PHP] Re: ASP to PHP language problems

2004-03-10 Thread Chris W. Parker
Alistair Hayward on Wednesday, March 10, 2004 2:46 PM said: > This is what I get when I try to create the recordset > > Notice: Use of undefined constant DBlink - assumed 'DBlink' in > D:\Development\Completed\Sealhouse\phpSealTest\ProductSpecs.php on > line 24

[PHP] Re: ASP to PHP language problems

2004-03-10 Thread Alistair Hayward
This is what I get when I try to create the recordset Notice: Use of undefined constant DBlink - assumed 'DBlink' in D:\Development\Completed\Sealhouse\phpSealTest\ProductSpecs.php on line 24 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in D:\Development\Com

[PHP] Re: ASP to PHP language problems

2004-03-10 Thread Ligaya Turmelle
I don't know ASP but I think this is what you want: $sql = "SELECT * FROM table WHERE Type = \"& type & \" order by style;"; $resultID = mysql_query($sql, DBlink); // send the query and returns a pointer to the results while ($row = mysql_fetch_assoc($resultID)) // while there are results giv