how to open links on same page/frame in php? [closed] - php

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I would like to open this page on the same index page
How can I put this link in the index page?
<a herf="includes/user_manage.php?id =<?php echo $id; ?>">
I have tried this, but it does not work:
<a herf ="index.php?page=includes/user_manage.php?id =<?php echo $id; ?> ">
But it works if I use:
<a herf="includes/user_manage.php?id =<?php echo $id; ?>">
Thanks

You have a type error
try
Link
To help you remember that you can pick any one of these that will stick in your head
Hypermedia Reference
Hypertext Reference
HTTP Reference
Hyperlink Reference
HTML Reference
Seeing as i have no idea what href stands for. it can be whatever you wan't it to be

Related

add attributes to image woocommerce product [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I would need a little help if I could. I have a store type web site made in wordpress. From anywhere on the site you want to enter the product page you can do it only if you click on the title. I want to make it possible to enter the product page and if you click on the image.
Below I attach the images with the code.
https://airless-consulting.ro/wp-content/uploads/2020/12/imagine_produs.jpg
https://airless-consulting.ro/wp-content/uploads/2020/12/titlu_produs.jpg
Do you have any suggestions?
Why don't you add a link on the image? Try this:
<a href="<?php echo esc_url($link); ?>">
<img src="" alt="" />
</a>

php's echo 'n' space in href link [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I used PHP's echo string in the WhatsApp share link, but when I share it on WhatsApp, the title space separates the trailing characters. help me.
<a class="footerbtn" href="whatsapp://send?text= *Surinder Muni* Early To Bed & Early To Rise* %0Amysite.com/?n=Good Morning">
<?php
echo $GET['n']
?>
You need to encode space (and other potencial invalid characters) when create link in WhatsApp
echo urlencode('Good morning');
In PHP for reading the $_GET['n'] value will be
echo urldecode($_GET['n']);

Where does the the_permalink() take you by default [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Currently I have:
Click here
This takes me to the index.php page
How do I change this in order to take me to another page?
Since you guys closed this. I will answer my own question:
The answer:
What you put in the WP_Query post_type = '(POST TYPE HERE)'
You can make a page called:
"single-(POST TYPE HERE).php
So once you click the link. This will take you to the:
"single-(POST TYPE HERE).php page
the_permalink() outputs the URL of the post currently being viewed in the loop. If you wanted to change the destination of the link then replace <?php the_permalink();?>.
Refs:
http://codex.wordpress.org/Function_Reference/the_permalink
http://codex.wordpress.org/The_Loop

Call php function using html href [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am searching for some hours today and I can not find the solution.
Here is the phpfuntion inside of the html href, which uses explode php-build-function to split the email and get the chars after #.
<a href='<?php echo afterchar('#',$nazwa_uz_l); ?>'>Log in <?php afterchar('#',$nazwa_uz_l); ?></a>
While I click the link it goes to localhost/gmail.com instead of gmail.com.
What should I do?
Try like this
<a href='http://<?php echo afterchar('#',$nazwa_uz_l); ?>'>Log in <?php afterchar('#',$nazwa_uz_l); ?></a>
The URL is relative if there's no protocol (http://) leading the URL.

Call post ID in Javascript [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to call the post ID in a script
<?php the_id() ?>
here :
$.get('', 'wpfpaction=add&postid=350');
I tried this but it's not working
$.get('', 'wpfpaction=add&postid='<?php the_id() ?>'');
Actually, my first goal was to do this action : wpfpaction=add&postid=350 which is usually in an url without load any url. Just to call the action.
Try using this instead:
<?php echo get_the_ID(); ?>
You don't need to change your javascript syntax to echo php variable into it.
$.get('', 'wpfpaction=add&postid=<?php the_ID() ?>');

Categories