By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,543 Members | 2,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,543 IT Pros & Developers. It's quick & easy.

undefined variable

P: 4
Anyone help me check my coding.The error will be undefined variable of "$ptitle".

Expand|Select|Wrap|Line Numbers
  1. <textarea name="ptitle" cols="100" rows="3" class="txt_blacknormal" id="ptitle"><?php echo $ptitle; ?></textarea>
  2.  
//undefined variable $msg.
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  if ($msg != '')
  3.    {
  4.     echo "<tr>
  5.      <td class=\"text9\"><div align=\"right\"><span class=\"txt_redrequired\">&nbsp;</span>&nbsp;</div></td>
  6.                       <td height=\"26\" colspan=\"3\" class=\"text8\"><div align=\"left\"><em class=\"txt_redrequired\">$msg</em></div></td>
  7.                       </tr>
  8.     <tr><td>&nbsp;</td>
  9.         </tr>";    
  10.     }?>
  11.  
Apr 2 '11 #1
Share this Question
Share on Google+
4 Replies


P: 21
Where is $ptitle defined?
Naming the form atribute via html wont connect it to php because it dosn't work like that(php is erver side and html client side).
Could you post the full code?
I cant analyze the problem without it.
Apr 3 '11 #2

P: 3
If this is an html form that posts to itself, you need to be sure to give the following commands before hand:
Expand|Select|Wrap|Line Numbers
  1. if (isset($_POST['ptitle'])){
  2.   $ptitle = $_POST['ptitle'];
  3. {
  4.  
Apr 3 '11 #3

P: 4
thank you for replied me.I settled the problems already.
Apr 4 '11 #4

P: 21
Nice work, never hesitate to ask We are here to help.
Apr 4 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.