<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script language="javascript">
$(document).mouseup(function (e)
{
var container = $(".form_wrapper");
if (container.has(e.target).length == 0)
{
container.hide();
}
});
function showdiv(){
document.getElementById('form_wrapper').style.display='block';
}
</script>
<div class="form_wrapper" id="form_wrapper" style="display:none">
show div and your menu
</div>
<a href="javascript:;" onClick="showdiv();">show</a>
i hope its help
Application development and sharing our knowledge to developer to developer for helping knowledge to build a effective solution for web architect.
Monday, January 7, 2013
Saturday, January 5, 2013
send data post using curl php example
create test.php pastbelow code
<?php
//set POST variables
$url = 'http://127.0.0.1/test/test_2.php';
$data = array( 'username' => 'bikash','password' => '123456');
//url-ify the data for the POST
foreach($data as $key=>$value) { $logininfo.= $key.'='.$value.'&'; }
rtrim($logininfo, '&');
//open connection
$ch = curl_init();
//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($data));
curl_setopt($ch,CURLOPT_POSTFIELDS, $logininfo);
//execute post
$result = curl_exec($ch);
//close connection
curl_close($ch);
?>
############create data recive page#############################
create test_2.php page below code
<?php
$username=$_POST['username'];
$password=$_POST['password'];
if($username=='bikash'){
echo "succes";
}else{
echo "fail";
}
?>
<?php
//set POST variables
$url = 'http://127.0.0.1/test/test_2.php';
$data = array( 'username' => 'bikash','password' => '123456');
//url-ify the data for the POST
foreach($data as $key=>$value) { $logininfo.= $key.'='.$value.'&'; }
rtrim($logininfo, '&');
//open connection
$ch = curl_init();
//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($data));
curl_setopt($ch,CURLOPT_POSTFIELDS, $logininfo);
//execute post
$result = curl_exec($ch);
//close connection
curl_close($ch);
?>
############create data recive page#############################
create test_2.php page below code
<?php
$username=$_POST['username'];
$password=$_POST['password'];
if($username=='bikash'){
echo "succes";
}else{
echo "fail";
}
?>
Subscribe to:
Posts (Atom)