1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Sending table data via email after submiting to DB

Discussion in 'PHP' started by mike2098, Aug 16, 2011.

  1. #1
    Hi I have a form where the data is stored in a db I would like to be able to email the data as well as store it this is my code for the content submission

    form begin code
    <form name='main' action='<?php echo $hm->Url(); ?>' method='post' <?php if ( isset($GLOBALS['_form_main_param_']) ) echo $GLOBALS['_form_main_param_']; ?>>
    <?php echo $hm->Zb('@page:state'); ?>
    Code (markup):
    <!-- [BEGIN] Main Form -->
    <div id="main_div">
    
    <?php include(INC_FORM_BEGIN); ?>
    
    <?php include( 'tpl.page.info.inc.php' ); ?>
    
    	<div style='margin:10px;padding:10px;'>
    
    	<!-- [BEGIN] Fields -->
    
    	<div style='padding:0 0 10px 0;font-weight:bold;'>
    	Please confirm the following information and click the [ Send ] button to send your form
     	<br/>or click the [ Back ] button to return to the previous page.
    	</div>
    
    	<table width='100%' border='0' cellpadding='3' cellspacing='1'>
    
    	<tr>
    		<td class='td_caption'><span class="required"></span> Name : </td>
    		<td class='td_value'><?php echo $hm->Zb('rs:def:name'); ?></td>
    	</tr>
    
    	<tr>
    		<td class='td_caption'><span class="required"></span> Address : </td>
    		<td class='td_value'><?php echo $hm->Zb('rs:def:address'); ?></td>
    	</tr>
    
    	<tr>
    		<td class='td_caption'><span class="required"></span> Post Code : </td>
    		<td class='td_value'><?php echo $hm->Zb('rs:def:postcode'); ?></td>
    	</tr>
    
    	<tr>
    		<td class='td_caption'><span class="required"></span> Mobile : </td>
    		<td class='td_value'><?php echo $hm->Zb('rs:def:mobile'); ?></td>
    	</tr>
    
    	<tr>
    		<td class='td_caption'><span class="required"></span> Landline : </td>
    		<td class='td_value'><?php echo $hm->Zb('rs:def:landline'); ?></td>
    	</tr>
    
    	<tr>
    		<td class='td_caption'><span class="required"></span> Age : </td>
    		<td class='td_value'><?php echo $hm->Zb('rs:def:age'); ?></td>
    	</tr>
    
    	<tr>
    		<td class='td_caption'><span class="required">*</span> Are you in employment?  Collage?  University?   Other?
    Have you entered other talent competitions : </td>
    		<td class='td_value'><?php echo $hm->Zb('rs:def:employed_school'); ?></td>
    	</tr>
    
    	<tr>
    		<td class='td_caption'><span class="required"></span> Are you a professional entertainer Yes/No.? : </td>
    		<td class='td_value'><?php echo $hm->Zb('rs:def:entertainer'); ?></td>
    	</tr>
    
    	<tr>
    		<td class='td_caption'><span class="required"></span> Email : </td>
    		<td class='td_value'><?php echo $hm->Zb('rs:def:email'); ?></td>
    	</tr>
    
    	<tr>
    		<td class='td_caption'><span class="required"></span> Are you a studying to be an entertainer Yes/No.? If so where are you studying? : </td>
    		<td class='td_value'><?php echo $hm->Zb('rs:def:entertainer'); ?></td>
    	</tr>
    
    	<tr>
    		<td class='td_caption'><span class="required"></span> Are you a single act/Group/Band/Choir/Other? : </td>
    		<td class='td_value'><?php echo $hm->Zb('rs:def:act'); ?></td>
    	</tr>
    
    	<tr>
    		<td class='td_caption'><span class="required"></span> Tell us about yourself and your talent! : </td>
    		<td class='td_value'><?php echo $hm->Zb('rs:def:about'); ?></td>
    	</tr>
    <tr>
    		<td class='td_caption'><span class="required"></span> Please give us any further information that you think we should know about your act e.g. Floor space required (Dancers. Bands. Choirs) Number of chairs required, number of microphones etc : </td>
    		<td class='td_value'><?php echo $hm->Zb('rs:def:more'); ?></td>
    	</tr>
        <tr>
    		<td class='td_caption'><span class="required"></span> Tell us about yourself and your talent! : </td>
    		<td class='td_value'><?php echo $hm->Zb('rs:def:about'); ?></td>
    	</tr>
        
         <tr>
    		<td class='td_caption'><span class="required"></span> Agree to Rules : </td>
    		<td class='td_value'>*Whilst we will endeavour to place you in your preferred heat we cannot guarantee that we can accomodate your request :<br />I accept the rules <?php echo $hm->Zb('rs:def:accept'); ?></td>
    	</tr>
    
    	</table>
    
    	<!-- [END] Fields -->
    
    	<!-- [BEGIN] Buttons -->
    	<div align="center" style="margin:20px 20px 20px 20px">
    	<?php echo $hm->Button( array( '<>'=>'<default/>', 'name'=>"_sc=_this/reg_page2_next&" ) ); ?>
    	<table width='100%'>
    	<tr>
    		<td align='center'>
    			<?php echo $hm->Button( array( '<>'=>'</>', 'name'=>"_sc=_this/reg_page2_prev&", 'src'=>'prev', 'value'=>"Back" ) ); ?>
    		</td>
    		<td align='center'>
    			<?php echo $hm->Button( array( '<>'=>'</>', 'name'=>"_sc=_this/reg_page2_next&", 'src'=>'send', 'value'=>"Send" ) ); ?>
    		</td>
    	</tr>
    	</table>
    	</div>
    	<!-- [END] Buttons -->
    
    	</div>
    
    <?php include(INC_FORM_END); ?>
    
    </div>
    Code (markup):
    form end code
    </form>
    Code (markup):
    anyone know how I could get the data sent via email as well as being stored in the db any help would be much appretiated

    thanks

    M
     
    mike2098, Aug 16, 2011 IP
  2. freelanceinphp

    freelanceinphp Member

    Messages:
    134
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    48
    #2
    freelanceinphp, Aug 18, 2011 IP