3 Replies - 427 Views - Last Post: 15 February 2013 - 01:59 PM Rate Topic: -----

#1 NagalakshmiNagu  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 14-February 13

I Developed one html form and now i want to send useing php

Posted 14 February 2013 - 05:53 AM

<html>
<head>
 <title>table1</title>
 <script language="javascript" type="text/javascript">
  function check()
 {

 if(document.getElementById("Calling Date1").value == "")

 {
 alert("Calling Date");
 document.getElementById('Calling Date1').focus();
 }
else if(document.getElementById('Acct No1').value=='')
 {
 alert("Acct No");
 document.getElementById('Acct No1').focus();
 }
 else if(document.getElementById('Alt No').value=='')
 {
 alert("Alt No1");
 document.getElementById('Alt No').focus();
 }
 
 else if(document.getElementById('CSR Name1').value=='')
 {
 alert("CSR Name");
 document.getElementById('CSR Name1').focus();
 }
 
 else
 {
 document.form.submit();
 }
 }
 </script>
 </head>
 
<body>
 <form method="post" action="dailytracker1.php" name="form" >
 <table width="100%" border="0">
 <tr>
 <td><label>Calling Date: </label>
 </td>
 <td><input type="text" name="Calling Date"  id="Calling Date1" />
 </td>
 </tr>
 
 <tr>
 <td><label>Acct No:</label>
 </td>
 <td><input type="text" name="Acct No" id="Acct No1" />
 </td>
 </tr>
 
 <tr>
 <td><label>Alt No1:</label>
 </td>
 <td><input type="text" name="Alt No1" id="Alt No" />
 </td>
 </tr>
 
 <tr>
  <td>Alt No2:</td><td><input type="text" name="Alt No2"></td></tr><tr>
     
 <tr>
 <td><label>CSR Name:</label>
 </td>
 <td><input type="text" name="CSR Name" id="CSR Name1"; />
 </td>
 </tr>
     
  <tr><td>Calling Status:</td><td><select name="Calling Status">
  <option value="--select--">-----------select----------</option>
  <option value="interested">Interested</option>
  <option value="not interested">Not Interested</option>
  <option value="callback">Callback</option>  
  <option value="followup">FollowUp</option>
  <option value="rnr">RNR</option>
  <option value="switched off">Switched Off</option>
  <option value="not reachable">Not Reachable</option>
  <option value="no doesn't exist">No Doesn't Exist</option>
  </select>
</td></tr><tr>`
    
<tr><td>Not Interested Reason:</td><td><select name="Not Interested Reason">
  <option value="--select--">-----------select----------</option>
  <option value="already using other ISP">Already using other ISP</option>
  <option value="interested/no network">interested/ no network</option>
  <option value="having excess line">Having excess line</option>
  <option value="shifted out of State/country">shifted out of State/country</option>
  <option value="not happy with Services">Not happy with Services</option>
  <option value="already taken new airtel connection ">Already taken new airtel connection </option>
  </select>
</td></tr><tr>
  
 <td>Interested Plan offered:</td><td><input type="text" name="Interested Plan offered"></td></tr><tr>
 <td>Change of Address:</td><td><input type="text" name="Change of Address"></td></tr><tr>
    
    
  </td></tr><tr>` 
    <tr><td>CPE Required:</td><td><select name="CPE Required">
  <option value="--select--">-----------select----------</option>
  <option value="YES">YES</option>
  <option value="NO">NO</option>
   </select>
</td></tr><tr>
     
     
 </td></tr><tr>` 
    <tr><td>Exe Visit required:</td><td><select name="Exe Visit required">
  <option value="--select--">-----------select----------</option>
  <option value="YES">YES</option>
  <option value="NO">NO</option>
   </select>
</td></tr><tr>
    
    
  <td>Remarks:</td><td><input type="text" name="Remarks"></td></tr><tr><td>
 <input type="button" value="Submit" onclick="check()" name="Submit" />

</td>
 </tr>
 </table>
 </form>
 </body>
 </html>



Is This A Good Question/Topic? 0
  • +

Replies To: I Developed one html form and now i want to send useing php

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3549
  • View blog
  • Posts: 10,317
  • Joined: 08-June 10

Re: I Developed one html form and now i want to send useing php

Posted 14 February 2013 - 06:53 AM

PHP does not send a form. either it creates it or it receives the form data.

it may very well be that your IDs are invalid, AFAIK spaces are not allowed. though you would find a notice in the Error Console for that.
Was This Post Helpful? 1
  • +
  • -

#3 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3028
  • View blog
  • Posts: 10,547
  • Joined: 08-August 08

Re: I Developed one html form and now i want to send useing php

Posted 15 February 2013 - 01:05 PM

Before starting with PHP you should learn to indent your code. You should also keep your Javascript in a separate file from the HTML. The computer doesn't care, but you're going to have a very difficult time keeping track of things if you start mixing Javascript, HTML, and PHP in the same file! That goes double if you don't indent properly.
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3593
  • View blog
  • Posts: 12,360
  • Joined: 12-December 12

Re: I Developed one html form and now i want to send useing php

Posted 15 February 2013 - 01:59 PM

FYI

language="javascript" is deprecated/obsolete;
IDs cannot contain spaces, and names shouldn't;
PLEASE don't name your form "form", it will only lead to confusion and possible error - use a little more imagination!

Each page should have a valid DOCTYPE declaration, but perhaps you just haven't shown this in your copied code.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1