467,893 Members | 1,905 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,893 developers. It's quick & easy.

PHP script not working inside my html page

Hi there ,
I have php script that works fine under my server
but I dont know how to put the html code inside my site.

feedback.html
Expand|Select|Wrap|Line Numbers
  1. <html dir="rtl">
  2. <head>
  3. <title> ????? ??? </title>
  4. </head>
  5. <body>
  6. <font face="arial" size="2" color="black">
  7. <strong><u><center>???? ????? ???</center></u></strong>
  8. <form action="mail.php" method="post">
  9.         ????? ?????? ??? :<input type="text" name="sender"><br><br> 
  10.         ???? ??????: <input type="text" name="subject"><br><br>
  11.         ??? ?????? : <br><br>
  12.         <textarea cols="30" rows="10" name="message"></textarea><br><br>
  13.         <input type="submit" value="???">
  14.         <input type="reset" value="??? ????">
  15.       </form>
  16.       </font>
  17. </body>
  18. </html>
  19.  
the mail.php
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $sender= $_POST['sender']; 
  3. $subject = $_POST['subject']; 
  4. $message = $_POST['message']; 
  5. if($sender == '' || $subject == '' || $message =='')
  6. {
  7.  echo("???? ????? ????? ?????");
  8. }
  9. elseif ($sender == $subject || $sender == $message || $message == $subject)
  10. {
  11.  echo("??? ???????? ????? ???? ???? ???? ???");
  12. }
  13.  else
  14.  {
  15.    mail('service@nett.co.il', $subject, $message, "From:".$sender); 
  16.    echo("<h3 align=center><b>?????? ????? ??????</b></h3>"); 
  17.  }
  18. ?>
  19.  
My Html with the CODE of feedback.html inside :
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <title>?? ?????? ?????? - ???? ????? ?????</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=windows-1255" />
  5. <meta http-equiv="pragma" content="no-cache"/>
  6. <meta http-equiv="cache-Control" content="no-cache"/>
  7. <meta name="description" content="?? ?????? ?????? - ????? ????? ??????"/>
  8. <meta name="keywords" content="?? ?????? ??????, ????? ??????, ????? ??????, ?????"/>
  9. <link rel="stylesheet" rev="stylesheet" href="http://www.nett.co.il/styles/styles.css" type="text/css" media="screen" charset="utf-8" />
  10. </head>
  11. <body  topmargin=0 leftmargin=0 margingwidth=0 marginheight=0>
  12. <center>
  13. <table width="743" cellpading="0" cellspacing="0" border="0">
  14. <tr>
  15. <td align="right">
  16. <a href="http://www.nett.co.il/index.html"><img src="http://www.nett.co.il/pc_support.gif"  border="0" alt="????? ????? ??????" /></a><br />
  17. </td>
  18. </tr>
  19. </table>
  20. <table style="background: url(http://www.nett.co.il/top.gif) " width="743" height="47" cellpading="0" cellspacing="0" border="0">
  21. <tr>
  22. <td width="480" valign="top" height="47" align="right">
  23. <h1>???? ????? ?????</h1>
  24. </td>
  25. <td width="230" height="47" align="right">
  26. </td>
  27. </tr>
  28. </table>
  29. <table style="background: url(http://www.nett.co.il/middle.gif) " width="743" height="500" cellpading="0" cellspacing="0" border="0">
  30. <tr>
  31. <td width="538" valign="top">
  32.         <table width="100%" cellpading="0" cellspacing="10" border="0">    
  33.         <tr>
  34.         <td width="130" valign="top" align="center">
  35.         <img src="http://www.nett.co.il/report.gif" height="125" width="118" border="0" /><br />
  36.         </td>
  37.         <td align="right" dir="rtl" valign="top">
  38.         <p>        ??? ?? ?? ?????? ????? ????????, ??? "???" ?????? ???? ?????        </p>
  39.         </td>
  40.         </tr>
  41.         <tr>
  42.         <td colspan="2" align="right">
  43.             <table id="before" width="95%" cellpadding="0" cellspacing="6" border="0">
  44.     <tr>
  45.         <td align="right">
  46. <font face="arial" size="2" color="black">
  47. <strong><u><center>???? ????? ???</center></u></strong>
  48. <form action="../new%20form/mail.php" method="post">
  49.         <p dir="rtl">????? ?????? ??? :<input type="text" name="sender"><br><br> 
  50.         ???? ??????: <input type="text" name="subject"><br><br>
  51.         ??? ?????? : <br><br>
  52.         <textarea cols="30" rows="10" name="message"></textarea><br><br>
  53.         <input type="submit" value="???">
  54.         <input type="reset" value="??? ????">
  55.       </p>
  56.       </form>
  57.       </font>
  58.             <p>&nbsp;</td>
  59.             </tr>
  60.         </table>
  61.         </td>
  62.         </tr>
  63.         </table>
  64. </td>
  65. <td width="1" valign="top">
  66. <img src="http://www.nett.co.il/sep_line.gif" width="1" height="480" style="margin: 0px; margin-top: -1px;"   /><br />
  67. </td>
  68. <td width="204" valign="top" align="center">
  69.  
  70.     <table width="190" cellpading="0" cellspacing="0" border="0">
  71.     <tr>
  72.     <td align="right">
  73.         <table width="190" cellpading="0" cellspacing="0" border="0">    
  74.         <tr>
  75.         <td align="right">
  76.         <a href="http://www.nett.co.il/index.html" class="menu">???? ????</a><br>
  77.         </td>
  78.         </tr>
  79.         </table>
  80.     </td>
  81.     </tr>
  82.     <tr>
  83.     <td height="1">
  84.     <img src="http://www.nett.co.il/sep_ver.gif" width="187" height="1" border="0"  alt="????? ??????" /><br>
  85.     </td>
  86.     </tr>
  87.     <tr>
  88.     <td align="right">
  89.         <table width="190" cellpading="0" cellspacing="0" border="0">    
  90.         <tr>
  91.         <td align="right" class"menu">
  92.         <a href="http://www.nett.co.il/services/index.html" class="menu">???????</a><br>
  93.         </td>
  94.         </tr>
  95.         </table>
  96.     </td>
  97.     </tr>
  98.     <tr>
  99.     <td height="1">
  100.     <img src="http://www.nett.co.il/sep_ver.gif" width="187" height="1"  border="0"  alt="????? ??????" /><br>
  101.     </td>
  102.     </tr>
  103.     <tr>
  104.     <td align="right">
  105.         <table width="190" cellpading="0" cellspacing="0" border="0">    
  106.         <tr>
  107.         <td align="right" class"menu">
  108.         <a href="http://www.nett.co.il/software/index.html" class="menu">?????? ??????</a><br>
  109.         </td>
  110.         </tr>
  111.         </table>
  112.     </td>
  113.     </tr>
  114.     <tr>
  115.     <td height="1">
  116.     <img src="http://www.nett.co.il/sep_ver.gif" width="187" height="1"  border="0"  alt="????? ??????" /><br>
  117.     </td>
  118.     </tr>
  119.     <tr>
  120.     <td align="right">
  121.         <table width="190" cellpading="0" cellspacing="0" border="0">    
  122.         <tr>
  123.         <td align="right" class"menu">
  124.         <a href="http://www.nett.co.il/computers/index.html" class="menu">????? ??????</a><br>
  125.         </td>
  126.         </tr>
  127.         </table>
  128.     </td>
  129.     </tr>
  130.     <tr>
  131.     <td height="1">
  132.     <img src="http://www.nett.co.il/sep_ver.gif" width="187" height="1"  border="0"  alt="????? ??????" /><br>
  133.     </td>
  134.     </tr>
  135.     <tr>
  136.     <td align="right">
  137.         <table width="190" cellpading="0" cellspacing="0" border="0">    
  138.         <tr>
  139.         <td align="right" class"menu">
  140.         <a href="http://www.nett.co.il/report/index.html" class="menu">???? ????? ?????</a><br>
  141.         </td>
  142.         </tr>
  143.         </table>
  144.     </td>
  145.     </tr>
  146.     <tr>
  147.     <td height="1">
  148.     <img src="http://www.nett.co.il/sep_ver.gif" width="187" height="1"  border="0"  alt="????? ??????" /><br>
  149.     </td>
  150.     </tr>
  151.     <tr>
  152.     <td align="right">
  153.         <table width="190" cellpading="0" cellspacing="0" border="0">    
  154.         <tr>
  155.         <td align="right" class"menu">
  156.         <a href="http://www.nett.co.il/about/index.html" class="menu">????? ?????</a><br>
  157.         </td>
  158.         </tr>
  159.         </table>
  160.     </td>
  161.     </tr>
  162.     <tr>
  163.     <td height="1">
  164.     <img src="http://www.nett.co.il/sep_ver.gif" width="187" height="1"  border="0"  alt="????? ??????" /><br>
  165.     </td>
  166.     </tr>
  167.     <tr>
  168.     <td align="right">
  169.         <table width="190" cellpading="0" cellspacing="0" border="0">    
  170.         <tr>
  171.         <td align="right" class"menu">
  172.         <a href="http://www.nett.co.il/contact/index.html" class="menu">??? ???</a><br>
  173.         </td>
  174.         </tr>
  175.         </table>
  176.     </td>
  177.     </tr>
  178.     </table>
  179. </td>
  180. </tr>
  181. </table>
  182.  
  183. <table style="background: url(http://www.nett.co.il/bottom/index.html.gif); height: 29px; "  width="743" cellpadding="0" cellspacing="0" border="0">
  184. <tr>
  185. <td style="width: 700px;"  align="right" valign="middle" class="bottom">
  186. <a href="http://www.nett.co.il/privacy.html" class="bottom">????? ??????</a> | <a href="http://www.nett.co.il/terms.html" class="bottom">???? ?????</a> | <a href="http://www.nett.co.il/about/index.html" class="bottom">????? ?????</a> | <a href="http://www.nett.co.il/contact/index.html" class="bottom">??? ???</a> | Copyright © 1999 - 2008 ?? ?????? ?????? <br />
  187. </td>
  188. </tr>
  189. </table>
  190. <table height="10" cellpading="0" cellspacing="0" border="0"><tr><td align="right"></td></tr></table>
  191. </center>
  192. </body>
  193. </html>
  194.  
Or simply , How to put the 1st code inside the 3rd one for the 2nd one to work.
http://nett.co.il/contact/feedback.html - The working script
http://nett.co.il/contact/index.html - My site

Thanks ahead,
Moses
Mar 26 '08 #1
  • viewed: 1782
Share:
2 Replies
dlite922
Expert 1GB
so your saying your code doesn't work when you upload it to another server (your "site")...

or I don't get it. what are you asking?
Mar 31 '08 #2
TheServant
Expert 1GB
What errors are you getting? I too am confuse what you are asking?

If you want to put the qst into the third, you only include:

[HTML]<form action="mail.php" method="post">
????? ?????? ??? :<input type="text" name="sender"><br><br>
???? ??????: <input type="text" name="subject"><br><br>
??? ?????? : <br><br>
<textarea cols="30" rows="10" name="message"></textarea><br><br>
<input type="submit" value="???">
<input type="reset" value="??? ????">
</form>[/HTML]

Is your mail.php file in the same directory as the rest of your files?
Mar 31 '08 #3

Post your reply

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

Similar topics

21 posts views Thread by deko | last post: by
13 posts views Thread by Yousuf Khan | last post: by
13 posts views Thread by Paul | last post: by
8 posts views Thread by dbaplusplus | last post: by
2 posts views Thread by bilaribilari | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.