Jump to content

Recommended Posts

it is posible to make something like this?

<a href="" onclick="refresh('index.php?info=1');"/>Index 1</a>

<a href="" onclick="refresh('index.php?info=2');"/>Index 1</a>

<a href="" onclick="refresh('index.php?info=3');"/>Index 3</a>

 

and what code do i need to autorealod the index.php?info=(1,2,3) in my Index.php (simple php file with index.php?info=(1,2,3) include) ?

Link to comment
https://forums.phpfreaks.com/topic/258462-onclick-code-help/
Share on other sites

This what do what you want

<?php $info=$_GET['info'];
// do some processing here
?>
<a href="index.php?info=1" />Index 1</a>
<a href="index.php?info=2" />Index 1</a>
<a href="index.php?info=3" />Index 3</a>

 

The variable $info would be available each time the link is clicked and would be the relnumbe 1, 2, or 3

Link to comment
https://forums.phpfreaks.com/topic/258462-onclick-code-help/#findComment-1324842
Share on other sites

i have

 

continut.php?info=(1,2,3)

<?php
$info = $_GET['info'];

if($info == "1")
{
?>
Text 1
<?
}
if($info == "2")
{
?>
Text 2
<?
}
?>

 

 

and in index.php i want to add an include or something onmouseover or onclick that in don't wnat to refresh the whole page,

i want to be refreshed just continut.php?info to the value 1,2 or 3 what i have choosed on onmouseover...

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/258462-onclick-code-help/#findComment-1324843
Share on other sites

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.