0

hi,
i am trying to upload an image with comment......!!

mycode is like below......

if($_POST){
getting posted variables for comment
mysql_query(adding into database);

if(image is posted){now getting image variables
mysql_query(inserting into database);
}
}

if works fine for me but problem is that i have two different tables one for comment and one for image........!! i want to add current user id also into image table but it is not passing to table but rest of code is working all the way fine..........!! how can i do that

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by network18
0

hi,
i am trying to upload an image with comment......!!

mycode is like below......

if($_POST){
getting posted variables for comment
mysql_query(adding into database);

if(image is posted){now getting image variables
mysql_query(inserting into database);
}
}

if works fine for me but problem is that i have two different tables one for comment and one for image........!! i want to add current user id also into image table but it is not passing to table but rest of code is working all the way fine..........!! how can i do that

your code need to be like this -

if(isset($_POST['submit_btn_name']) && $_POST['submit_btn_name'] !='')
{
//your code
}
0

but boss i am trying to make facebook like commentsystem.......!!
that if just comment is typed and submit it hit, it just post comment,but if user wants to attach any photo that it attach a photo........!!

0

but boss i am trying to make facebook like commentsystem.......!!
that if just comment is typed and submit it hit, it just post comment,but if user wants to attach any photo that it attach a photo........!!

There might be some logical error, that's why your user_id is not getting inserted in the image table.
Post the code here

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.