This question already has answers here:
JavaScript before leaving the page
(10 answers)
Closed 5 years ago.
echo '<td>Delete Candidate</td>';
How can i add a confirmation message before the data will be deleted? Like asking are you sure
Try this
echo '<td>Delete Candidate</td>';
Use confirm function from javascript
confirm('message');
echo '<td>Delete Candidate</td>';
https://www.w3schools.com/jsref/met_win_confirm.asp
Related
This question already has answers here:
Is there a function similar to setTimeout() (JavaScript) for PHP?
(10 answers)
Closed 2 years ago.
I want to display certain message one by one like:
settimeout(5);
echo "Message 1";
settimeout(5);
echo "Message 2";
settimeout(5);
echo "Message 3";
The settimeout function is not correct in php!
So what is the best way to do that?
This is something that needs to be done in Javascript.
PHP does not have a settimeout function.
You could however try thye sleep() method
https://www.php.net/manual/en/function.sleep.php
This question already has answers here:
Reference - What does this error mean in PHP?
(38 answers)
Closed 5 years ago.
i need to add a text in the end of the url while user click on a button.
for example :
www.example.com/people/xyz
when the user click the button, it should go to
www.example.com/people/xyz/edit
i did a search, & built code, but it didn't work, here it's :
$editlink = $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
echo 'EDIT'
Please Help me to solve it
Correct your code as follows:
<?php
$editlink = $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
?>
EDIT
This question already has answers here:
How can I combine two strings together in PHP?
(19 answers)
Closed 6 years ago.
Ya here is my code.
<?php print "<?php echo $this->lang('learn_cn')?>" ?>
It comes with blank nothing show.
<?php echo $this->lang('learn_cn')?>
What is the correct way to make this work. TY
You're already in the process of printing out HTML, so just escape that part like you did in the href:
<?php print "" . $this->lang('learn_cn') . "" ?>
This question already has answers here:
Reference: Comparing PHP's print and echo
(2 answers)
Closed 7 years ago.
Which statement should I be using in PHP? Print or Echo?
In PHP, Echo and Print do the same thing.
Whats the difference? is one of them faster?
Thanks!!
This is a duplicate. Please refer to:
How are echo and print different in PHP?
This question already has answers here:
'Why' doesn't the script print anything? [duplicate]
(5 answers)
Closed 9 years ago.
This is a weird issue.
I just trying to print/create a string like below :
sort="name<string>"
so I just do
echo 'sort="name<string>"';
however, it seems that PHP store it as :
sort="name"
What do I miss?
Try this...
echo htmlspecialchars('sort="name<string>"', ENT_QUOTES, 'UTF-8');
Try this:
echo 'sort="name<String>"';