/    Sign up×
Community /Pin to ProfileBookmark

PHP Echo syntax, to display images in form.

I am new to PHP, I am trying to use image buttons on my login and password form. I cannot get the second image to work. Any help would be appreciated.
Code below.

<?php
if (!($_SESSION[‘username’]))
{

echo “<img src=’buttons/ulogin.jpg’ />”; //This is the first image
echo “<form action=’login.php’ method=’post’>
<p align=’center’>
<input type=’text’ name=’username’ /><br/>

//this is where I want the second image without messing up the login process

<input type=’password’ name=’password’ /><br/>
<input type=’submit’ value=’Log in’ /><input type=’reset’ value=’Clear’ /><br/>
<tr><span class=’style13′>”;

if ($_GET[‘error’] == ‘0’)
echo “<br />Incorrect Username/Password<br />”;
else if ($_GET[‘error’] == ‘1’)
echo “<br />Please Login to continue!<br />”;
else if ($_GET[‘error’] == ‘2’)
echo “<br />Account not Active, Check Email!<br />”;
else if ($_GET[‘error’] == ‘3’)
echo “<br />Successful Log out!<br />”;

echo “<br /></span> </tr>
<tr><span class=’style3′>
<td><a href=’lostPassword.php’>Forgot Password?</a></td><br/>
</span></tr>
</p>
</form>
“;
}
else
{
//$id = $_SESSION[‘username’];
echo ”
<h2 class=’style3′>Member Options! </h2>
<p class=’style4′>
<a href=’logout.php’>Logout</a><br/>
<a href=’links.php’>My Contacts</a><br/>
</p>
<h2 class=’style3′>Edit your details </h2>
<p class=’style4′>
<a href=’mydetails.php’>User Details</a><br />
<a href=’mycontact.php’>Contact Details</a><br />
<a href=’mybusiness.php’>Business Details</a>
</p>
“;
}

?>

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @nifa86 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...