Jump to content


Photo

no pic prolam please help cheers


  • Please log in to reply
4 replies to this topic

#1 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 21 May 2006 - 03:56 AM

I got a strange problam the first picture within the database shows, Then i added a if condition to cheeck the pictire is in the database then show it, then i said if the condition is 0 show a no pic but dosent show.

what does show is the image placement but not the nopic.gif.

The nopic.gif is not in the database as a name but in a folder and does work.


please help cheers


$picture='select * from members_picture_uploads where id='.$row['id'].' ';

$data=mysql_query($picture);

if(!$data["userfile_name"]==1) {

while($pic=mysql_fetch_assoc($data)){

$link='<img width="150" src="members_uploads/'.$pic["userfile_name"].'"></img>';
}

}else{

$no_picture='select * from members_picture_uploads where id='.$row['id'].' ';

$get_picture=mysql_query($no_picture);

if(!$get_picture["userfile_name"]==0) {

$link='<img width="150" src="no_picture/nopic.gif"></img>';
}
}

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#2 Ferenc

Ferenc
  • Members
  • PipPipPip
  • Advanced Member
  • 94 posts

Posted 21 May 2006 - 04:17 AM

no_picture/nopic.gif

The path to nopic.gif is probably invalid or incorrect. Or the file doesn't exist.

Everything you want to know is here.

#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 21 May 2006 - 04:30 AM

[!--quoteo(post=375655:date=May 21 2006, 04:17 AM:name=Ferenc)--][div class=\'quotetop\']QUOTE(Ferenc @ May 21 2006, 04:17 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
no_picture/nopic.gif

The path to nopic.gif is probably invalid or incorrect. Or the file doesn't exist.
[/quote]

No no no no no

The pic there ok!

The only way i see to solve this problam is to insert into the database a nopic.gif from the start and then let the user change there pic.

But i wanted to displaly a nopic picture if the userfile field was empty but no luck yet cheers.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 21 May 2006 - 05:01 AM

i tried this aswell but still no joy.

i have placed the nopic.gif in the same folder as the members_uploads where the members pictures go.

what i was trying to do in this code is if the userfile_name is 0 then change the userfile_name to the nopic.gif name but no luck yet.



$picture='select * from members_picture_uploads where id='.$row['id'].' ';

$data=mysql_query($picture);

while($pic=mysql_fetch_assoc($data)){


if(!$pic["userfile_name"]==0){

$pic["userfile_name"]="nopic.gif";

}else{

if(!$pic["userfile_name"]==1){

$link='<img width="150" src="members_uploads/'.$pic["userfile_name"].'"></img>';
}
}
}

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#5 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 21 May 2006 - 06:13 AM

holly grail

[!--sizeo:5--][span style=\"font-size:18pt;line-height:100%\"][!--/sizeo--]solved[!--sizec--][/span][!--/sizec--]


$picture='select * from members_picture_uploads where id='.$row['id'].' ';

$data=mysql_query($picture);

while($pic=mysql_fetch_assoc($data)){

if($pic['userfile_name']){

$link='<img width="150" src="members_uploads/'.$pic["userfile_name"].'"></img>';

}else{

$link='<img width="150" src="members_uploads/nopic.gif"></img>';
}
}

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users