<?php
global $messagepart, $mobilenumber, $status, $jobno, $doneTime;
$mobilenumber = $_REQUEST['mobilenumber'];
$jobno = $_REQUEST['jobno'];
$messagepart = $_REQUEST['messagepart'];
$status = $_REQUEST['status'];
$doneTime = $_REQUEST['doneTime'];
$con = mysql_connect("DBLocation","Username","Password");
mysql_select_db("DBNAME", $con);
$sql="INSERT INTO Table_Name (messagepart, Mobilenumber, doneTime, status, jobno)
VALUES ('$messagepart','$mobilenumber','$doneTime','$status','$jobno')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "Thank you for sending a Message";
mysql_close($con);
?>
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class Get_Smsc_Dr : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
String Mobile_Number;
String Recivedon;
String Message_part;
String sender_name;
String jobno;
String status;
jobno = Request.QueryString["jobno"];
Mobile_Number = Request.QueryString["mobilenumber"];
Message_part = Request.QueryString["messagepart"];
Recivedon = Request.QueryString["DoneTime"];
sender_name = Request.QueryString["sender_name"];
status =Request.QueryString["status"];
SqlConnection conn = new SqlConnection("Persist Security Info=False;User ID=sa;Password=XXXX;Initial
Catalog=XXXXX;Network Library=dbmssocn;Data Source=192.168.1.77;pooling=true;Max
Pool Size=199;Min Pool Size=5");
string sql = "insert into Request_Inbox(jobno,mobilenumber,messagepart,DoneTime,sender_name,status)";
sql = sql + "values ('" + jobno + "','" + Mobile_Number + "','" + Message_part +
"','" + Recivedon + "','" + sender_name + "','"+ status +"')";
Response.Write(sql);
try
{
conn.Open();
SqlCommand cmd = new SqlCommand(sql, conn);
cmd.ExecuteNonQuery();
}
catch (System.Data.SqlClient.SqlException ex)
{
string msg = "Insert Error:";
msg += ex.Message;
Response.Write(msg);
}
finally
{
conn.Close();
}
}
}
Try
Dim Mobile_Number, Recivedon, Message_part, sender_name, jobno, status As String
jobno = Request.QueryString("jobno")
Mobile_Number = Request.QueryString("mobilenumber")
Message_part = Request.QueryString("messagepart")
Recivedon = Request.QueryString("DoneTime")
sender_name = Request.QueryString("sender_name")
status = Request.QueryString("status")
Catch ex As Exception
Response.Write("Something went wrong")
End Try
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%
try {
String jobno;
String mobilenumber;
String status;
String DoneTime;
jobno=request.getParameter("jobno");
mobilenumber =request.getParameter("mobilenumber");
status=request.getParameter("jobno");
DoneTime =request.getParameter("mobilenumber");
System.out.println(jobno);
System.out.println(mobilenumber);
System.out.println(status);
System.out.println(DoneTime);
}
catch (Exception e)
{
out.println(e);
}
%>