Hyperlinks appear as links but not clickable [closed] - php

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 months ago.
Improve this question
I have been trying to send out emails from my server using PHP but the hyperlinks in email are not clickable.
They appear blue just like normal links but they are not linked.
This is what I have:
$subject = "Email subject";
$l="http://www.example.com/Oa7dl";
$txt="<a href'$l' target='_blank' title='CLICK HERE TO LEARN MORE AND APPLY'><img src='http://www.example.com/pics/click_here.png' alt='CLICK HERE TO LEARN MORE AND APPLY' /></a> or FOLLOW LINK: <a href'$l' target='_blank'>http://example.com/Oa7dl</a>";
This will be sent as a body of an email message.

<a href='$l' not <a href'$l'
You missed the =

Subtituting variable for its value would result in :
href'http://www.goo.gl/Oa7dl'
This means you are missing a = after href. It should be:
href='http://www.goo.gl/Oa7dl' or href='$l'

Related

problem using anchor button in server(cent os) [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
Improve this question
In my project i am using anchor button based on if else condition. In windows it's working perfectly.
HTML
<?php
$actionbutton = $row['status'] == 'success' ?
anchor('Users/getpdf/'.$row['appno'],'Generate Pdf') :
anchor('Users/validate/'.($row['appno']),'Pending') ;
?>
<td align="center"><?php $actionbutton;?></td>
after uploading in server (cents os) the button not displayed. how to solve this error?
On your first command, it assigns the value to your $actionbutton variable.
Your 2nd command, I think you want to echo the $actionbutton.
Maybe you want this <?=$variable?>.
So, in your case <?=$actionbutton?>
Codeigniter Documentation 👈 about alternative syntax.

How to Concatenate a PHP variable and a string [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
might be a very dumb question but i'm trying to make a html string with a php var and then html.. what the heck am I doing wrong?!? :(
$author_name = get_the_author(); ?>
<h4><?php $author_name;?> On-Demand Webinars</h4>
Thank you!
Just missed the echo.
<h4><?php echo $author_name;?> On-Demand Webinars</h4>
You missed "echo" statement
e.g
<?php echo $author_name;?> On-Demand Webinars
OR
<?=$author_name;?>

PHP echo button with on-click wont function well [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I have tried to echo the button, however the link just does not work, so I thinks something is wrong with the href link, please help.
echo "<input class='button_normal' type='button' value='entertainment' onclick='window.location..href=<Electronic and Entertainment Products.php>'>";
#james_91 The code below should do the trick:
<?php
echo "<input class=\"button_normal\" type=\"button\" value=\"entertainment\" onclick=\"window.location.href='Electronic and Entertainment Products.php'\">";
?>
I would advise against using spaces in your file names so use underscores instead maybe.
JS within a button within PHP works best with escaped quotation marks, you also had two dots in between location and href as commented by Fred -ii-

PHP - Using $_POST after a link [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I have a form with a textbox with name="name".
In my code, I use a direct image hosted on another website in the format:
$grav_url = "http://yourwebsitehere.com/avatarimage.php?username=YourUsername";
I want the YourUsername part to be replaced with the input of the textbox.
For this to work, i'm trying the following code:
$grav_url = "http://yourwebsitehere.com/avatarimage.php?username="+ $_POST['name'];
What am I doing wrong? PHP noob here
in php . is used for concatenate string not +
here try this
$grav_url = "http://yourwebsitehere.com/avatarimage.php?username=".$_POST['name'];

HTML PHP if else statement [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I have the following part of code inside my HTML body tag:
<?php if(1==2) { ?>
<a class="demage" href="xxxx.html">demage</a>
<a class="history" href="xxxx.html">history</a>
<?php } else { ?>
<a class="Sign In" href="login_page.html">Sign In</a>
<a class="Sign Up" href="register_page.html">Sign Up</a>
<?php } ?>
but it displays the 4 links in a row, not the last two as it is supposed to. What is wrong with the code?
Answered in comments, collective effort.
By default PHP will only evaluate/parse files containing PHP with the extension
.php
I don't see any error in the code the code is running as expected. (See the image attached.)
May be there's some problem with your php.

Categories