I bir boşluk verilir önce içerik textarea, ben yalnızca ilk sözcüğü olsun yayınlamak zaman ben, bir textarea vardı. Textarea benim değer 'O deli adam' Örneğin, i 'O' yalnızca olsun.
plz bana bu sorunu çözmek için yardımcı olmak;
Kod:
<form name="SendSMS" method="post" action="admin_main.php">
<div class="reg_item">Category </div>
<div class="reg_item">
<select name="cat" class="reg_combo" class="tboxstyle">
<option value="car" class="tboxstyle">Carrer</option>
<option value="tho" class="tboxstyle">Thoughts</option>
<option value="jok" class="tboxstyle">Jokes</option>
<option value="hea" class="tboxstyle">Health</option>
</select>
</div><br />
<div class="reg_item">Message </div>
<div class="reg_item"><input type="text" name="message" class="tboxstyle"></input></div><br />
<?
if ( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
$msms=new sms();
$msms->sendsms();
}
?>
<div class="reg_item"><input type="submit" name="register" value="Send >>" /></div>
</form>
fonksiyonu:
function sendsms()
{
try
{
$cat =$_POST[cat];
$message =$_POST[message];
$link="http://www.aswinanand.com/sendsms.php?uid=9488446874&pwd=sivad&phone=9952880550&msg=dg";
$table="";
if($cat=="car")
{
$table=="carrer_memb";
}
elseif($cat=="tho")
{
$table=="thoughts_memb";
}
elseif($cat=="jok")
{
$table=="jokes_memb";
}
elseif($cat=="hea")
{
$table=="health_memb";
}
$result = mysql_query("SELECT mobile FROM carrer_memb");
while($row = mysql_fetch_array($result))
{
echo $message;
$link="http://www.aswinanand.com/sendsms.php?uid=9488486874&pwd=sivakasi&phone=".$row['mobile']."&msg=".$message;
$contents = file_get_contents($link);
echo $contents;
//header("Location: http://www.aswinanand.com/sendsms.php?uid=9488486874&pwd=sivakasi&phone=".$row['mobile']."&msg=".$message);
}
}
catch(Exception $e)
{
echo 'Caught exception: ', $e->getMessage(), "\n";
}
}
}