Jump to content

Varable change with onclick


lamboman

Recommended Posts

I have 3  images Shown below. What I want to do is add an onclick that will change another variable (lets call it $secondary). So when any one of these are clicked it will change the variable $secondary to whatever I want it to be. (hope that makes sence)

 

<?php

$main[0]="<img src='images/00.gif'>";

  echo $main[0];

?>

    <?php

$main[1]="<img src='images/01.gif'>";

  echo $main[1];

?>

    <?php

$main[2]="<img src='images/02.gif'>";

  echo $main[2];

?>

Link to comment
https://forums.phpfreaks.com/topic/237879-varable-change-with-onclick/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.