Forums

PHP

This topic is locked

HTTP_GET_VARS conflict with PHP Upload?

Posted 13 Jun 2002 16:47:39
1
has voted
13 Jun 2002 16:47:39 Julio Taylor posted:
I'm truly sorry to keep posting about this, but i've been given a deadline and this still haunts me <img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle>

A critical part of the system i'm developing involves attaching files to existing records (upload files and using a record update behaviour). As i meantioned earlier in another post, it seems to work fine until i filter the record using HTTP_GET_VARS(e.g. select * from table where job_id = $HTTP_GET_VARS["job_id"]).

I'm wondering if there is anyone else out there that has succesfully implemented the PHP Upload extension into an Update Record form. I've followed the instructions provided with the extensions regarding the order in which things are done (i.e. Upload --&gt; Recordset --&gt; Update Record).

If anyone could help me i'd be most grateful, as i am in the s**t regarding time/etc, and i have found nothing that works as well as Tim's PHPUpload extension.

The error is get is "You have an error in your SQL syntax near '' at line 1"

This is (as far as i think) where the problem might be:

&lt;?php
$Recordset1__MMColParam = "0";
if (isset($HTTP_GET_VARS["job_id"]))
{$Recordset1__MMColParam = $HTTP_GET_VARS["job_id"];}
?&gt;
&lt;?php
$Recordset1=$ims_php-&gt;Execute("SELECT * FROM job_master WHERE job_id = " . ($Recordset1__MMColParam) . "" or DIE($ims_php-&gt;ErrorMsg());
$Recordset1_numRows=0;
$Recordset1__totalRows=$Recordset1-&gt;RecordCount();
?&gt;

Thanks a lot in advance.

-- Julio

Edited by - poolio on 13 Jun 2002 16:59:24

Replies

Replied 21 Jun 2002 17:22:19
21 Jun 2002 17:22:19 Dries Coucke replied:
I had a similar error when implementing the PHP upload behaviour. I could solve it by adding session_start(); on the second line in the page. I always had this message when I tried to filter on session variables. But don't ask me why <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>

Reply to this topic