Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
sonny  
#1 Posted : Tuesday, February 27, 2007 9:54:34 PM(UTC)
sonny

Rank: Member

Groups: Member
Joined: 9/9/2006(UTC)
Posts: 22

Hi,

Im running php4.3.10 on Linux. The image uploader works fine. The images do get uploaded. One page calls the index.php which in turn calls the upload.php. In the upload.php file i have some sql (mysql) to insert the images which are being uploaded.

I have 2 variables: for sake of ease,i'll call them var1 and var2.

I tried using the get method:

Code:
iu.addParam("Action", "upload.php?v1=<?php echo "$var1" ?>&v2=<?php echo "$var2" ?>");

i wasnt sure of the syntax with the php bit, so for testing i hardcoded the line to:

Code:
u.addParam("Action", "upload.php?v1=HELLO&v2=WORLD"); <-- that didnt work either

any help with examples is much appreciated. I will always ever pass in 2 values and no more. Id rather use the above method, but im not sure what im doing wrong.

thanks Sonny

Edited by user Tuesday, December 18, 2007 4:45:19 PM(UTC)  | Reason: Not specified

thanks in advance,

Sonny

sonny  
#2 Posted : Wednesday, February 28, 2007 7:44:29 AM(UTC)
sonny

Rank: Member

Groups: Member
Joined: 9/9/2006(UTC)
Posts: 22

Just to add i also tried this method.

In index.php in the <body> section i have the following (wrapped in php):

Code:
echo "<form id=\"adddata\" name=\"adddata\">
    dealerid: <input id=\"did\" name=\"did\" type=\"text\" value=\"" .$dealerid. "\"/>
       carid: <input id=\"cid\" name=\"cid\" type=\"text\" value=\"" .$carId . "\" />
</form>";

Then in the javscript section, i have:

Code:
iu.addParam("AdditionalFormName", "adddata");

the action is set to go the "upload.php" page.

In the upload.php page im retrieving the values using:

Code:
$did=$_POST['did'];
$cid=$_POST['cid'];

then im using these in my sql statement. Which obviously isnt working. Is there way to print out the POST values or any other way to debug this. Im not sure uf the values are coming thru. I cant seem to echo anything to the screen

thanks

Sonny

Edited by user Tuesday, December 18, 2007 4:46:42 PM(UTC)  | Reason: Not specified

thanks in advance,

Sonny

sonny  
#3 Posted : Wednesday, February 28, 2007 9:12:18 AM(UTC)
sonny

Rank: Member

Groups: Member
Joined: 9/9/2006(UTC)
Posts: 22

Nevermind. Got it working.
thanks in advance,

Sonny

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.