Jump to content

Call to action on my website


shyam13

Recommended Posts

Hi All,

 

I am trying to create a call to action feature on my website, I am trying to send data from one form to another by using the post function and on the second form when the user clicks submit the data should be sent to the database, I can send data to the other form when they submit the data the data is not sent to the database, What could be the problem?

 

code:

 

<div class="callback" style='width:150px'>

  <form action='calltoaction.php' method='post'>

  <table width='320' border="1">

  <tr>

  <td width='139'>

  <p>Next Step</p>

  <p>Connect with Us</p>                   

  </td>

  <td rowspan='2'>

  <textarea name='user_question' rows='4'  placeholder='Please ask a question and we will respond as quick as possible' value='<?php echo $_POST['user_question'] ?>'></textarea>

  </td>

  </tr>

  <tr>

  <td>

  <input name='user_name' placeholder='Please enter your name' class='required' required value='<?php echo $_POST['user_name'] ?>' />

  </td>

  </tr>

  <td align='center'>

  <input type='submit' value='ask a question' />

  </td>

  <tr>

  <td><input name="website_id" type="hidden" value="1" /></td>

  </tr>

  </tr>

  </table>

  </form>

    </div>

 

Calltoaction:

 

  <div class="callback" style='width:150px'>

  <form method='post'>

  <table width='320' border="1">

  <tr>

  <td width='250'>

  <p>Next Step</p>

  <p>Connect with Us</p> 

  <tr>                                   

  <td><input name='user_name' type='text' placeholder='Please enter your name' class='required' required value='<?php echo $_POST['user_name'] ?>'/></td>

  </tr>

  <tr>

  <td><textarea name='user_question' rows='4' placeholder='Please ask a question and we will respond as quick as possible' value='<?php echo $_POST['user_question'] ?>'></textarea></td>

  </tr>

  <tr>

  <td><input name='call_email' type='text' placeholder='Please enter your email' class='required' required value='<?php echo $_POST['user_email'] ?>'/></td>

  </tr>

  <tr>

  <td><input name='call_callback' class='datepicker' placeholder='best time for callback' value='<?php echo $_POST['call_calback'] ?>'/>optional</td>

  </tr>

  <tr>

  <td><input name='call_tel' type='text' placeholder='telephone number' value='<?php echo $_POST['call_tel'] ?>' />optional</td>

  </tr>

  </td>

  </tr>

  <td align='right'>

  <button name='submit' type='submit'>Submit query</button>

  </td>

  </tr>

  </table>

  </form>

    </div>

 

Thank You

Link to comment
https://forums.phpfreaks.com/topic/266723-call-to-action-on-my-website/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.