Jump to content

[SOLVED] How to do it?


xcoderx

Recommended Posts

Its a simple idea.

 

<table>
  <tr>
    <td>
      <form>
        <select name="foo">
          <option value="1">1</option>
          <option value="2">2</option>
          <option value="3">4</option>
        </select>
        <input type="submit" name="submit">
      </form>
    </td>
    <?php
      if (isset($_POST['submit'])) {
        echo "<td>You selected {$POST['foo']}</td>";
      }
      ?>
  </tr>
</table>

 

Excuse the table.

Link to comment
https://forums.phpfreaks.com/topic/161629-solved-how-to-do-it/#findComment-852956
Share on other sites

Thanks bro, ok so i place the dropdown in the left hand where the menu is and that php code in center of the page where i want the content to show rite? Can i use link instead of dropdown? But how wil i name a link? My categories would be in link so would i add lik <a herf="index.php?name="foo"/>1</a> ?

Link to comment
https://forums.phpfreaks.com/topic/161629-solved-how-to-do-it/#findComment-852960
Share on other sites

No that was something i was asuming. Ok il explain where i said menu il add links to folders like

 

A

B

C

 

say i click on A and inside folder A there would be a page.php and i want to show whatever is writen in page.php in right side something like this after u click on A

 

A.    |      page.php results here

Link to comment
https://forums.phpfreaks.com/topic/161629-solved-how-to-do-it/#findComment-852965
Share on other sites

Ok im back lol ok here an example what i want to do http://netwatcher.net/main.htm look at this site the menu is in left and than its has option to click like links etc and when u click results show in right hand side thats what im planing to do but unable to figure it out.

Link to comment
https://forums.phpfreaks.com/topic/161629-solved-how-to-do-it/#findComment-852980
Share on other sites

Exactly bro that is basic but it was something i showed for example, i want to do that with php say like i $_request that link in the right hand within index.php of my site when click on menu category without having to go to some other page.php. Like i explained. Anyways i gues its not  posible to do it. Thanks for ur help

Link to comment
https://forums.phpfreaks.com/topic/161629-solved-how-to-do-it/#findComment-852990
Share on other sites

If there are only going to be a few you could set each link to call index.php?link=page1, index.php?link=page2 and so on and then...

 

<?php
$link = $_GET['link'];
?>

 

To get the link and set a variable.

 

Then where you want the content to display use if and elseif statements to include whatever page corresponds to that link...

 

<?php
if ($link=="page1")
{
include 'page1.php';
}
elseif ($link=="page2"){
include 'page2.php';
}
else
  echo "Invalid link";
?>

Link to comment
https://forums.phpfreaks.com/topic/161629-solved-how-to-do-it/#findComment-853024
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.