Jump to content

Skullptor

Members
  • Posts

    6
  • Joined

  • Last visited

About Skullptor

  • Birthday 06/26/1946

Previous Fields

  • Languages
    html, php, dreamweaver mx

Profile Information

  • Location
    Lewisburg Pennsylvania
  • Interests
    Motorcycle Riding and Model Trains

Skullptor's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I've stored the path in the database but when I try to retieve it to a variable, such as $picture, it will not display using the variable. I can echo the variable by itself to see what is contained in the variable and it is the path along with the image name. Here's a short page I made to test the image display capability: <?phpsession_start();require('adminconnect.php');$extract = mysql_query("SELECT * FROM Catelog")or die(mysql_error());$row_saleitems = mysql_fetch_array($extract);$numrows = mysql_num_rows($extract);$_SESSION['itemtoedit']=$ItemToEdit; $Pix = $row_saleitems['pix'];echo "Number of rows: $numrows";echo"Picture path: $Pix";?><!DOCTYPE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><style type="text/css"><!--#apDiv1 { position:absolute; left:425px; top:221px; width:200px; height:341px; z-index:1;}--></style><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>STMRR - Summer Trees</title> <link href="style.css" rel="stylesheet" type="text/css" /><style type="text/css"><!--body { background-color: #006600;}--></style></head><title>Test Image Display</title></head><?php$picture = '../images/winter/PC051089.JPG';echo "$Pix";?><body><div id="apDiv1"><img src="<?php echo $picture; ?>" width="200" height="300" /></div></body></html> To run this script the url is stmrr.com/protectedpages/testimage.php
  2. Thank you so much for the help. I'll take your advise and get up to date on the latest and greatest. Clair
  3. Is there a way to store jpg files in a database field that can later be extracted into a dynamic variable for display on a web page. Everything I've tried doesn't work. I can't get the picture to display only the name. I can get the picture to display using html code img src and the path to the image but I want to be able to replace the file name in the path with a variable that holds the name of the image. Tried using PHP code but when I try that, it displays the name of the file name for the picture but not the picture or doesn't display anything at all. <td><p align="center"><img src="../images/summer/PC051103.JPG" width="200" height="300" /></p> <?PHP $picture="../images/blue spruce/PC051116.JPG"; echo "$picture"; ?> Any suggestions? Maybe it can't be done.
×
×
  • Create New...