Jump to content

how to post a variable in php


rafiq

Recommended Posts

Here is my code

[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Gallagher's Boxty House - Traditional Irish Restaurant - Dublin, Ireland.</title>
<meta name="keywords" content="Gallaghers gallaghers boxty house traditional irish restaurant bar dublin ireland temple bar coddle stew boxties food eat out boxtyhouse boxtyhouse.ie beef salmon lamb chicken bacon vegetarian cusine desert murphy's murphys beer stout menu starter starters main course appetiser pancake champ colcannon griddle " />
<link rel="stylesheet" type="text/css" href="style.css" />


<?php

$rte1=isset($_REQUEST['rte1'])?$_REQUEST['rte1']:"";
$sub = $_REQUEST['subject'];



?>

</head>

<body>
<table class="toptable" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" height="75%" valign="top">
  <table class="maintable" border="0" cellspacing="3" cellpadding="0">
<tr>
<td colspan="2" id="header">
<? include('header.php'); ?>

</td>

</tr>
<tr>
<td valign="top"  class="contentarea">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
  <td id="sef"><a href="after_login2.php">Admin Home</a> </td><td align="right" valign="top"><a href="logout.php" class="logout">Sign Out</a></td>
</tr>
<tr>
<td colspan="2">
<br/><br/>
<form action="newsletter.php" method="post" enctype="multipart/form-data" name="newsletter" onSubmit="return submitForm();">

<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
<td align="right">Subject:</td>
<td class="datafield">
<?=$sub?>
</td>
  </tr>
  <tr>
<td align="right" valign="top">Message:</td>
<td class="alternate">
<?=$rte1?>


</td>
  </tr>
  <tr>
  <td>&nbsp;</td>
  <td align="left" >
<input type="submit" value="Edit">

</td>
  </tr>
 
</table>

</form>
<br /><br />
</td>
</tr>
</table>
</td>
</tr>
<? include('footer.php')?>
</table>
</td>
</tr>
</table>




</body>
</html>[/code]


i want to get the values of [b]$sub[/b] and  [b]$rte1[/b] but the problem is that when there is a string in these variable it can post easily but when there is html in these variable it fail to post
Link to comment
https://forums.phpfreaks.com/topic/31322-how-to-post-a-variable-in-php/
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.