I'm trying to input an image in a code i have but i tried using the html way which is

<td><a href="<?php echo $section_link[1]; ?>"><img src="../images/icons/graph.gif" width="32" height="32" alt="" /></a></td>

But it doesn't seem to show the code in the page..How do i do this please HELPPP!!!!

Please explain further...Your code seems ok

Basically i'd like to put an image in a php code that i have but it's not displaying the image on the page..

This is the code:

<?php
/**
 * 
 * Install setup page to allow the inital user to be set up
 * 
 */
 
 require_once("include/inc_global.php");




 //build the page
 $UI->page_title = 'CAPAT Questions';
 $UI->menu_selected = 'home';
 $UI->breadcrumbs = array	('Questions'	=> null ,);


 $UI->head();

 $UI->body();
 $UI->content_start();
 
 // see if any of the settings have been sent
 $question1 = (string) fetch_POST('question1', null);
 $question2 = (string) fetch_POST('question2', null);
 $question3 = (string) fetch_POST('question3', null);
 $question4 = (string) fetch_POST('question4', null);
 $question5 = (string) fetch_POST('question5', null);
 $username = (string) fetch_POST('username', null);
 $password = (string) fetch_POST('password', null);
 
 //if we have at least the username and the password then we can say that we are processing
 if ($username and $password){
 	
 	// Sanitize the username/password data
	$username = substr($username,0,32);
	$password = substr($password,0,32);
	
	//hash the password
	//$password = md5($password);
	
	//add this information to the database
	$sql = 'INSERT INTO questions(question1, question2, question3, question4, question5, username, password)
		    VALUES ("'.$question1.'", "'.$question2.'", "'.$question3.'", "'.$question4.'", "'.$question5.'", "'.$username.'", "'.$password.'");';
	$DB->_process_query($sql);
?>	
	<div class="content_box">
		<p> Your Answers have now been submitted</p>
		
	</div>
<?php	
 }else{ 

?>

<div class="content_box">
	<h1><b><p>Please Answer the Following Questions</p></b></h1>

	<form action="questions.php" method="post" name="login_form">
	
				
					<th><label for="question1"><h3>QUESTION 1</h3>
<ol>
  <li>
    <p>Is it possible to pass data from PHP to JavaScript? Justify your answer</p>
  </li>
  <ol type=A start=1>
    <li>
      <p>No, because PHP is server-side, and JavaScript is client-side.</p>
    </li>

    <li>

      <p>No, because PHP is a loosely typed language.</p>
    </li>
    <li>
      <p>Yes, because JavaScript executes before PHP.</p>
    </li>
    <li>
      <p>Yes, because PHP can generate valid JavaScript.</p>

    </li>
<ol>
 <TEXTAREA wrap="virtual" name="Comments" rows=5 cols=70 MAXLENGTH=100></TEXTAREA><BR>

									
				<tr>
			<label for="question1"><h3>QUESTION 2</h3>
  <li>
    <p>Which of the following form element names can be used to create an array in PHP? Justify your answer</p>
  </li>
  <ol type=A start=1>
    <li>
      <p><tt>foo</tt></p>
    </li>

    <li>

      <p><tt>[foo]</tt></p>
    </li>
    <li>
      <p><tt>foo[]</tt></p>
    </li>
    <li>
      <p><tt>foo[bar]</tt></p>

    </li>
	</ol>
 <TEXTAREA wrap="virtual" name="Comments" rows=5 cols=70 MAXLENGTH=100></TEXTAREA><BR>

									</tr>
						<tr>
					<th><label for="question3"><h3>QUESTION 3</h3>
<li>
    <p>Which of the following employees earns the most? Justify your answer</p>
  </li>
  <ol >
    <li>
      <p></p>

    </li>

    <li>
      <p><tt></tt></p>
    </li>
    <li>
      <p><tt></tt></p>
    </li>
    <li>

      <p><tt></tt></p>

    </li>
    <p>  <b></b><tt></tt><tt></tt> </p>
  </ol>
	<td><a href="<?php echo $section_link[1]; ?>"><img src="../images/icons/graph.gif" width="32" height="32" alt="" /></a></td> <TEXTAREA wrap="virtual" name="Comments" rows=5 cols=70 MAXLENGTH=100></TEXTAREA><BR>

									</tr>
				<tr>
					<th><label for="question4"></label></th>
					<td><input type="hidden" value="none"name="question4" id="question4" maxlength="30" size="30" value="" /></td>
				</tr>
				<tr>
					<th><label for="question5"></label></th>
					<td><input type="hidden" value="none"name="question5" id="question5" maxlength="30" size="30" value="" /></td>
				</tr>
				<tr>
					<th><label for="username"></label></th>
					<td><input type="hidden" value="none"name="username" id="username" maxlength="16" size="10" value="" /></td>
				</tr>
				<tr>
					<th><label for="password"></label></th>
					<td><input type="hidden" value="none" name="password" id="password" maxlength="16" size="10" value="" /></td>
				</tr>
			</table>

			<div class="form_button_bar">
				<input class="safe_button" type="submit" name="submit" value="Submit" />
			</div>
	</div>
	</form>
</div>
<?php
 }
 
 $UI->content_end(false);
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.