Solved

php a varianble no display

Posted on 2013-06-08
3
287 Views
Last Modified: 2013-06-08
<?php if ($mode == "updating") {echo <a href="login.php?id={$plugin_id}">click here</a> ?>

come up result => abc.com/login.php?id=

but work when <?php echo $plugin_id; ?>

this not working when variable inside hyperlink. expert pls help
0
Comment
Question by:john80988
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39232474
You need quotes around the string literals you are echoing:

<?php if ($mode == "updating") { echo "<a href=\"login.php?id={$plugin_id}\">click here</a>" } ?>

Open in new window

0
 

Author Comment

by:john80988
ID: 39232490
Parse error: syntax error, unexpected '<'
0
 

Author Closing Comment

by:john80988
ID: 39232495
yes it work, tq
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question