Jump to content

Recommended Posts

Hello, I need some php to do something important but should be somewhat easy. But I'm not sure how to approach it. Basically I need to put a text link into some php. So that only when the text link is clicked on a small form will appear. Thats it! The rest I can figure out on my own, just need to know how the form can appear when a text link is clicked on, using php.

 

Please let me know, and thank you very much.

Link to comment
https://forums.phpfreaks.com/topic/39221-what-kind-of-php-will-do-this/
Share on other sites

If you want the page to refresh, then yes you can do that. Have the link contain something like

http://mysite.com/page.php?show=1

 

and then on the page do:

<?php
$show = $_GET['show'];
if($show == 1){
   print 'The other text here';
}
?>

Thanks very much you guys and Jesirose, I have this in a page.php page.

 

<?php

$show = $_GET['show'];

if($show == 1)

{print "<a href='http://www.website.com/page.php?show=1'>test link</a>";}

?>

 

But no text link is appearing. I guess it would help to know that this is supposed to do? For instance is my page supposed to be named page.php?show=1???? instead of just page.php ....

 

If so what does that all doing? Thanks a lot.

Strange that post added a whole bunch of stuff to it that I didn't add. Let me try again.

 

I have this in a page.php page.

 

<?php

$show = $_GET['show'];

if($show == 1)

{print "<a href='http://www.website.com/page.php?show=1'>test link</a>";}

?>

 

But no text link is appearing. I guess it would help to know that your code is supposed to do? For instance is my page supposed to be named page.php?show=1? instead of just page.php ....  and how does all this connect with it?

 

Thanks a lot.

Thats terrific but I still don't know what it does. Also my post is still incorrect. I am trying to make a closing A tag for an a href link. But it keeps turning it into a url tag instead. Can anyone tell me what this code and the "Show" commands are supposed to do? Thank you very much.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.