|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
print graphics number .jpg from table
I'm trying to print numbers, I save a value in a column of the table, and I have all the number .jpg in the images/numeros
and I use this code to show it in the site... I have to repeat it all the number with each table's column. this is the condition.. if ($row['num1']) = 1 print "<img src=\"images/numeros/01.jpg\" width=\"75\" height=\"40\">"; elseif ($row['num1']) = 2 print "<img src=\"images/numeros/02.jpg\" width=\"75\" height=\"40\">"; so on.... and it return me this error.... Parse error: parse error in /home/mailcrea/public_html/loto/index.php on line 63 I need to know if I can do this in another way...? a more easy code to show number depending on the one save in the table...? |
|
#2
|
|||
|
|||
|
just get your row from your database and say you declare it as
PHP Code:
i think thats what you want im not too sure...this will simply take what you have in the database store it in a variable and when you call it for the picture it calls it in that variable...so if the variable would be equal to 2 then then it would display 2.jpg hope this helps im not quite understanding the problem the problem that i am seeing with your example is that your dont have the {} anywhere here is the modded one that should work PHP Code:
something along those lines Last edited by Bruski : October 4th, 2003 at 09:15 PM. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > print graphics number .jpg from table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|