Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
How to send this form?
Old 01-14-2009, 11:28 AM How to send this form?
Junior Talker

Posts: 1
Trades: 0
Hallo,
I have made a form (my first form) with addRow function.

de code
PHP Code:
<?php
require "db.php";

$query"SELECT * FROM taallessen ORDER BY taalnaam ASC";
$res mysql_query($query) or die(mysql_error()); 
$lesdata "";
while (
$row mysql_fetch_row($res)){
if (
$lesdata)
$lesdata .= ",";
$lesdata .=  '"'.$row[1].'"';
}
?> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Join now</title>
<link href="main.css" type="text/css" rel="stylesheet">
</head>

<script language="JavaScript">
function del_formrow(){
  if (!this.table_formcontainer)
    this.table_formcontainer = document.getElementById("table_formcontainer");

  if (!this.table_formcontainer)
    return;

var table_formcontainer = document.getElementById("table_formcontainer")
if (table_formcontainer.rows.length > 1)
{
  table_formcontainer.deleteRow(table_formcontainer.rows.length-1);
}
 
 table_formcontainer.deleteRow();
}

function add_formrow(){
  if (!this.table_formcontainer)
    this.table_formcontainer = document.getElementById("table_formcontainer");

  if (!this.table_formcontainer)
    return;

  var new_row = table_formcontainer.insertRow(-1);
  var new_cell1 = new_row.insertCell(0);
  var new_cell2 = new_row.insertCell(1);
  var new_cell3 = new_row.insertCell(2);

  var new_input1 = document.createElement("input");
  new_input1.type = "text";
  new_input1.size = "40";
  new_input1.name = "kidername[]";
  new_cell1.appendChild(new_input1);
  
  var new_input2 = document.createElement("input");
  new_input2.type = "text";
  new_input2.size = "5";
  new_input2.name = "age[]";
  new_cell2.appendChild(new_input2);

   var new_input3 = document.createElement("select");
   new_input3.name="lesson[]";
   var options = [<?php echo $lesdata?>] ;
   for (var i = 0; i < options.length; i++)
   {
    var option = document.createElement("option");
    option.value = options[i];
    option.text= options[i];
    try
    {
      new_input3.add(option, null);
    }
    catch(error)  
    {
      new_input3.add(option);
    }
  }
  new_cell3.appendChild(new_input3);  
  } 
</script>
<body>
<div id="credit"><b>T e s t</b></div>
<br>
<form name="data" method="post" action="confirmation.php" onSubmit="return validate(this);">
<fieldset> <legend>
<font color="blue"><b>Kid informations</b></font></legend><br>
<table id="table_formcontainer">
    <tr bgcolor="#e5e5e5">
          <td width="200"> Kidname </td> <td width="20"> Age </td> <td width="80"> Lesson </td>            
     </tr>
     <tr>
          <td><input name="kidname[]" size="40"></td> <td><input name="age[]" size="5"></td> 
          <td><select name="lesson[]"><option value="select">select</option><option>Chines</option>
          <option>German</option><option>France</option><option>English</option><option>Italian</option>
          <option>Nederlands</option><option>Spain</option></select></td>            
     </tr>     
</table>
<table>     
     <tr>
              <td width="500" align="right">[<b><a href="#" onclick='add_formrow();'>+</a></b>]</td>
            <td>&nbsp;</td><td>[<b><a href="#" onclick='del_formrow();'>-</a></b>]</td>      
     </tr>
</table>
<br>
<fieldset> <legend>
<font color="blue"><b>Parent informations</b></font></legend><br>
<table>
    <tr>
            <td width="100">Name</td> <td>:</td> <td><input name="naam" size="50"></td>            
    </tr>
    <tr>
            <td width="100">Address</td> <td>:</td> <td><input name="adres" size="50"></td>            
    </tr>
    <tr>
            <td width="100">Zip</td> <td>:</td> <td><input name="postcode" size="50"></td>            
    </tr>
    <tr>
            <td width="100">City</td> <td>:</td> <td><input name="woonplaats" size="50"></td>            
    </tr>
    <tr>
            <td width="100">Phone</td> <td>:</td> <td><input name="telefoon" size="50"></td>            
    </tr>
    <tr>
            <td width="100">Email</td> <td>:</td> <td><input name="email" size="50"></td>            
    </tr>
</table>
<table>    
    <tr>
            <td width="100">&nbsp;</td> <td>&nbsp;</td>
            <td><br><input type="submit" name="submit" value=" C o n f i r m ">&nbsp;&nbsp;
            <input type="button" value=" R e s e t " onclick="reset()"></td>
    </tr>
</table>
</form></fieldset>        

<br>
</body>
</html>
How to send this form to my email? perhaps in php.
perhaps someone can help me. thanks in advance

Last edited by blueskin; 01-14-2009 at 11:30 AM..
blueskin is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-14-2009, 03:53 PM Re: How to send this form?
NullPointer's Avatar
Will Code for Food

Posts: 2,784
Name: Matt
Location: Irvine, CA
Trades: 0
Take a look at the php mail function.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Reply     « Reply to How to send this form?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.50057 seconds with 12 queries