Jump to content

HELP ME.......


nancyaggarwal

Recommended Posts

Sir i am fresher in php. So help me as soon as possible.

My query is how we send sms to mobile number from php form.I have made a php form in which i have made two things one is "text area"  and other is  "drop down".for that i am using two tables.names are coming from database dynamically from table and "smsinformation" table is used for storing the data "userid,message,phoneno.,date".

please tell me how i m send a sms to mobile number.

 

my code is:-

HERE IS A DATABASE CONNECTION.......

<?

// $cid=0;

$sql= mysql_query("select mobileno from mobileusrs where user_id='$_POST[recipient]'");

          //echo $sql;

while($row = mysql_fetch_array($sql))

  {

$mob=$row['mobileno'];

 

}

?>

<?

if (isset($_POST['submitinfo'])) {

$sql1 = "insert into smsinformation (name,mobileno,date,msg)values('$_POST[recipient]','$mob',now(),'$_POST[message]')";

//echo $sql1;

mysql_query($sql1);

}

?>

<table cellpadding="0" cellspacing="0" border="0">

<tr><td class="main_td">

<form name="frm1" action="#" method="POST" onsubmit="return valid()">

 

<table cellpadding="0" cellspacing="0" border="0" align="center">

<tr><td colspan="2" align="center" class="heading_form" style="color:#333333;  padding:10px; text-decoration:none;"></td></tr>

<tr><td colspan="2" align="center"><font color="green"></font></td></tr>

<tr>

<td  valign="top">

<table cellpadding="12" cellspacing="0" border="0" width="300px">

  <tr>

                <td>

                  <span> Name</span><span>*</span></td>

<? $sql="select * from mobileusrs";

//echo $sql;?>

<?$rs=mysql_query($sql);?>

 

  <td align="left">                       

                  <select name="recipient"  class="input" style="width:190px; font-family:Geneva, Arial, Helvetica, sans-serif; font-size:11px;">

                  <option>-----SELECT-----</option>

<?while($row = mysql_fetch_array($rs)){?>

<option value="<?echo $row['user_id'];?>"> <?echo $row['name'];?></option><?}?>

 

 

</select></td>

 

</tr><tr>

 

<td align="left">Message:</td>

<td><textarea rows="10" cols="10" name="message" style="height:100px;" value="Enter your text here:-" class="text_box_form"/></textarea></td>

</tr>

 

<tr>

 

<td>   </td><td align="left" style="padding-left:12px; padding-top:10px;">

<input type="Submit" name="submitinfo" value="Send"></td></tr>

</table>

</form>

</td></tr></table>

</td></tr>

</table>

 

 

THANKS AND REPLY ME SOON

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.