Jump to content

Send parameters trough the URL


scuarplex

Recommended Posts

Hi, in a include i put this:

 

include.php

function printIndex()
{
print '
...
<a href="mypage.php?add=1"><p class="auto-style2"><img alt="" align="middle" height="43" src="images/add.png" width="200"></a></p>
<a href="mypage.php?remove=1"><p class="auto-style2"><img alt="" align="middle" height="33" src="images/remove.png" width="340"></a></p>
...
';
}

 

And in mypage.php i got:

 

<?php
session_start();
include 'include.php';

if(isset($_SESSION["h_user"]))
{

if(!isset($_POST["remove"]) && !isset($_POST["add"]))
{printIndex();}


}
?>

 

My problem is that when i click on "mypage.php?add=1" it still uses the function printIndex(), so it's not sending the POST params.

 

¿What do i have to do to send the params by URL?

 

Link to comment
https://forums.phpfreaks.com/topic/238427-send-parameters-trough-the-url/
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.