Hi everybod.I have a question for you.
I am trying to send post to html form.But I could not it.Please help me.
This is my html form ekle.php(add.php)
PHP Code:
<?php include ('ayar.php'); $islemformu = '<form action="kaydet.php" method="post"> <input type="text" name="adres" /> <input type="submit" /> </form>'; echo $islemformu ; ?>
and this is kaydet.php (save.php)
PHP Code:
<?php include ('ayar.php'); $gelenadres = $_POST["adres"] ; mysql_query ("INSERT INTO loglar (adres) VALUES ( '$gelenadres' )"); echo " $gelenadres Kaydedildi"; ?>
And other Sender (My Curl Post Page)
PHP Code:
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://siteadresim/script/ekle.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,"adres=http://www.google.com.tr"); curl_exec ($ch); curl_close ($ch); ?>
Where is the my error?  Curl is not working.I must be post it.
Last edited by hayalet_kral; 06-05-2009 at 12:02 PM..
|