473,761 Members | 4,511 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP script not working inside my html page

1 New Member
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
2 2148
dlite922
1,584 Recognized Expert Top Contributor
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
1,168 Recognized Expert Top Contributor
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.ph p" 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><b r>
<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

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

Similar topics

21
3895
by: deko | last post by:
Is it possible to call a php script from an html page? I have a TestPage.php that I want to convert to TestPage.html - but still call a php script from it. This is how my TestPage.php looks now: <?php setcookie("mycookie",time(),3600,"/"); ?> <html>
13
1571
by: Yousuf Khan | last post by:
Hi, I have this pre-built JS routine that creates a text animation special-effect. The routine was included inside a freeware HTML editor, called AceHTML. The problem is that it seems to work only on IE and IE-emulating browsers (such as Opera). According to what other people have told me, the problem is because this script has an outdated browser detection scheme, and that the procedure it uses for Netscape is no longer valid in modern...
8
4687
by: Jakej | last post by:
I've been using a javascript in an html file for a banner slider, and it works as desired. But I'd like to use it on more than one page and it would be great if I could transfer the code to a .js file and call it with the <script src="filename.js"></script> tags as I do for many other .js files. But, when I try to do that way, it doesn't work right. It will display the banner text, but only on the 0,0 page coordinate and doesn't slide....
13
1670
by: Paul | last post by:
Hi I have a .net application that shows the start page for a few seconds and then goes to another start page. I was wondering if it would be possible to put a count on the page to let the user know how much time is left before it goes to the other page, thanks. -- Paul G Software engineer.
3
2959
by: Water Cooler v2 | last post by:
Questions: 1. Can there be more than a single script block in a given HEAD tag? 2. Can there be more than a single script block in a given BODY tag? To test, I tried the following code. None of the script gets executed. Can someone please give me a direction as to what I may be missing? Thanks.
8
2391
by: dbaplusplus | last post by:
I worked on web development using java script many many years, so I am now a newbie to javascript. I have a single html page, which is generated dynamically using some programming language. Web page will be viewed using Microsoft's IE browser (version 6.x ....). Webapge is self-contained. i.e., it does not refer to any links outside the webpage, however, it uses bookmarks inside the same page. I have a long table to display, table has...
2
2972
by: bilaribilari | last post by:
Hi all, I am using Tidy (C) for parsing html pages. I encountered a page that has some script as follows: <script> .... var abc = "<script>some stuff here</" + "script>"; .... </script>
9
8559
by: whitgurley | last post by:
I've searched the web as well as I can for a solution to this problem but have found nothing and just don't know enough about JavaScript to figure out what's going. What I'm trying to do is convert this script: <a href="#" onclick="MM_goToURL('parent.frames','color2.html');return document.MM_returnValue">TEST</a> ....to something that I can use within a Flash movie, which as far as I can tell means that it needs to reside in the...
2
2599
by: kwenterprise | last post by:
Hello All, I am normally great at figuring out ways around iframe issues that frustrate us all. I am using javasript to try and break an iframe that I have a banner rotator embedded in but it is not working. I want visitors to click the banners and actually be taken to those pages instead of the new page being stuck in the iframe. What ever the case when I click on any banner, it opens the url right there inside the frame instead of...
0
9377
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9811
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.