how to post value in php one to other page using ahref tag in php html -


in code:

<td align="left"><a href="update.php?id='.$od_id.'">' ."complete" . '</td></tr>'; 

i generate multiple od_id when click on other particular od_id od_id post other page od_id. don't want display on display "complete" , on behalf can access od_id in multiple pages trying use hidden type not working other process post value other page.

it possible send please me.

one more thing, using hidden type not working. also, how it's work post value 1 page other page using html in php tag.

$res = mysql_query($sql);  echo '<table align="center" cellspacing="0" cellpadding="5" width="75%" border="1">      <tr>      <td align="left"><b>order details number</b></td>      <td align="left"><b>menu id</b></td>      <td align="left"><b>submenu id</b></td>      <td align="left"><b>quantity</b></td>      <td align="left"><b>note</b></td>      <td align="left"><b>note master</b></td>      <td align="left"><b>status</b></td>      </tr> '; $i=0; while ($row = mysql_fetch_array($res))         {           $od_id = $row['od_id'];          echo '<tr bgcolor="' . $bg . '">      <td align="left">' .$row['od_id'] .'</a></td>      <td align="left">' . $row['menu_id'] . '</td>      <td align="left">' . $row['submenu_id'] . '</td>      <td align="left">' .$row['quantity'] . '</td>      <td align="left">' .$row['note'] . '</td>      <td align="left">' .$row['note_master'] . '</td>      <td align="left"><a href="update.php?id='.$od_id.'">' ."complete" . '</td>      </tr>';         $i++;         }   echo '</table>'; 

  1. don't use mysql_* functions depracated.
  2. yes possible via html use <form action="yoururl.html" method="post"></form>
  3. if want post values php site should use curl http://coderscult.com/how-to-post-data-with-curl-in-php/
  4. but if within site use $_session.
  5. if want use $_get instead of post on update.php use should use code $id = (int)$_get['id']; variable get
  6. if have form on generated page php going submited can use <input type="hidden" /> send variable other page.
  7. if want hide od_id in link can encrypt mcrypt()
  8. you use while() loop in same way use for() loop. for($i=0; $row = mysql_fetch_array($res); ++$i) same.

last thing should replace

   <td align="left"><a href="update.php?id='.$od_id.'">' ."complete" . '</td> 

with

  <td align="left"><a href="update.php?id='.$row['od_id'].'">' ."complete" . '</td> 

and remove $od_id = $row['od_id']; doesn't needed assign new variable. did you?


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -