Hello coders, I have a script that saves the values to database. I have this value

$uzuncuk = $cummle." is easy to use. We suggest you to install ".$cummle." to your computer and view the features of the product. For your safety, please have a decent antivirus installed, with updated definitions that will protect you from virus threats.<table cellpadding=0 cellspacing=0 border=0><tr cellpadding=0 cellspacing=0><td cellpadding=0 cellspacing=0><input type=button class='srollover' rel='nofollow' onClick=\"window.location='".$pinti3."'\"></td><td cellpadding=0 cellspacing=0 class='srollover'><div style='padding-bottom: 1px; padding-left: 4px;'>".$cummle." - ".$size."</div></td><td width=7 cellpadding=0 cellspacing=0 class='srollover1'></td></tr></table>";

But it doesnt save the value to my database. But if I make this;

$uzuncuk = "blabla";

It saves. And it means that the problem is in the value. In what way should I write that to save it to my database ?

First
You are giving value for $uzuncuk with join some text
$uzuncuk = $cummle." is easy to use. We suggest you to install ".$cummle." to your computer and view the features of the product. For your safety, please have a decent antivirus installed, with updated definitions that will protect you from virus threats.

Form where you take the value or post value for $uzuncuk ??

post your problem brief and form??

I am using it in here

mysql_query("INSERT INTO dle_post (title,date,short_story,full_story,category,tags,autor,approve,alt_name) values ('$cummle','$zaman','$kisa','[B]$uzuncuk[/B]','$category','$btags', '$author', '1', '$nee')");

$uzuncuk is the content that I put in the article. And the problem is, it doesnt save the $uzuncuk to database. The problem encourages from the content of $uzuncuk.

post your full code....
In $uzuncuk what you are taking integer value or text

Ok...

<?PHP
ini_set('max_execution_time',0);

$sayfa=(int)$_GET['sayfa'];
if($sayfa){
$site = "http://www.xxx.com/download".$sayfa.".html";

$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$site);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$adres=curl_exec($ch);
curl_close($ch);

preg_match_all('#<TITLE>(.*?) download</TITLE>#si', $adres, $aldim);
preg_match_all('#/Download/(.*?)/4-#si', $adres, $aldim3);

if (empty($aldim[1][0])) {
die('<meta http-equiv="refresh" content="0;URL=?sayfa='.($sayfa+1).'">');
}

$srcrsm = "http://www.xxx.com/dlf_$sayfa.html";

$ch1=curl_init();
curl_setopt($ch1,CURLOPT_URL,$srcrsm);
curl_setopt($ch1,CURLOPT_RETURNTRANSFER,1);
$srcrsm=curl_exec($ch1);
curl_close($ch1);

$resim2 = $aldim[1][0];
$title1 = $aldim[2][0];
$site1 = $aldim[3][0];
$enson = $aldim[4][0];
$b1 = $aldim[5][0];
$b2 = $aldim[6][0];
$b3 = $aldim[7][0];

preg_match_all('#available.<br><br>(.*?)1</a><br><br>#si', $srcrsm, $aldim4);
preg_match_all('#<span class="style1">(.*?)<table cellspacing=0 cellpadding=0>#si', $adres, $aldim2);
preg_match_all('#<td><b>Publisher:<b/></td><td>&nbsp;</td><td>(.*?)</td>#si', $adres, $aldim5);
preg_match_all('#<td><b>License:<b/></td><td>&nbsp;</td><td>(.*?)</td>#si', $adres, $aldim6);
preg_match_all('#<td><b>Size:<b/></td><td>&nbsp;</td><td>(.*?)</td>#si', $adres, $aldim7);

$cummle = $aldim[1][0];
$publisher = $aldim5[1][0];
$license = $aldim6[1][0];
$size = $aldim7[1][0];

$pinti = array('<a href=','target=_new>Mirror #','"',' ','
');
$pinti1 = array('','','','','');
$pinti3 = str_replace($pinti,$pinti1,$aldim4[1][0]);

$ciktisi = strip_tags($aldim2[1][0]);
$category = "4";
$author = "harubo";


[B]$uzuncuk[/B] = $cummle." is easy to use. We suggest you to install ".$cummle." to your computer and view the features of the product. For your safety, please have a decent antivirus installed, with updated definitions that will protect you from virus threats.<table cellpadding=0 cellspacing=0 border=0><tr cellpadding=0 cellspacing=0><td cellpadding=0 cellspacing=0><input type=button class='srollover' rel='nofollow' onClick=\"window.location='".$pinti3."'\"></td><td cellpadding=0 cellspacing=0 class='srollover'><div style='padding-bottom: 1px; padding-left: 4px;'>".$cummle." - ".$size."</div></td><td width=7 cellpadding=0 cellspacing=0 class='srollover1'></td></tr></table>";


$zaman = date ("Y-m-d H:i:s");
$kisa = $kisacik;
$uzun = $uzuncuk;

$search = array('+','!','?','.',':');
$replace = array('','','','','');
$cumle1 = str_replace($search,$replace,$cummle); 

$asd = array('+','!','?',':',' ',',','&');
$fgh = array('','','','','-','-','-');
$nee = str_replace($asd,$fgh,$cummle); 

function kywrd($kelime) {
	
	$ayir  = explode(" ",$kelime);
	$count = count($ayir);
	for($i=0; $count>$i; $i++) {
		if($i>0) $sonuc .= ", ";
		$sonuc .= strtolower($ayir[$i]);
	}

	return $sonuc;
}
$btags = kywrd($cumle1);

		$tags = array();

		$btags = explode (",", $btags);

		foreach ($btags as $value) {

			$tags[] = "('".$row."', '".trim($value)."')";
		}

$btags = kywrd($cumle1);

$database = "xx_";
$host = "localhost";
$dbuser = "xxx";
$dbpass = "xxx";

$baglan = @mysql_connect($host,$dbuser,$dbpass);
@mysql_select_db("$database");

mysql_query("INSERT INTO dle_post (title,date,short_story,full_story,category,tags,autor,approve,alt_name) values ('$cummle','$zaman','$kisa','$uzun','$category','$btags', '$author', '1', '$nee')"); 

echo '<meta http-equiv="refresh" content="1;URL=?sayfa='.($sayfa+1).'">';
}else{
echo '<script>location.href="?sayfa=1";</script>';
}
?>

in your table for column full_story set type to text and set length upto 2000

change according to you... check variable for $uzun while insert value

What I dont understand is, if I use this

$uzuncuk = $cummle." is easy to use. We suggest you to install ".$cummle." to your computer and view the features of the product. For your safety, please have a decent antivirus installed, with updated definitions that will protect you from virus threats.";

It saves to database, but if I use this

$uzuncuk = $cummle." is easy to use. We suggest you to install ".$cummle." to your computer and view the features of the product. For your safety, please have a decent antivirus installed, with updated definitions that will protect you from virus threats.

<table cellpadding=0 cellspacing=0 border=0><tr cellpadding=0 cellspacing=0><td cellpadding=0 cellspacing=0><input type=button class='srollover' rel='nofollow' onClick=\"window.location='".$pinti3."'\"></td><td cellpadding=0 cellspacing=0 class='srollover'><div style='padding-bottom: 1px; padding-left: 4px;'>".$cummle." - ".$size."</div></td><td width=7 cellpadding=0 cellspacing=0 class='srollover1'></td></tr></table>";

It doesnt save. And what do you mean with this "check variable for $uzun while insert value " ?

Bcoz You are concatenating value with table.

$uzuncuk = $cummle." is easy to use. We suggest you to install ".$cummle." to your computer and view the features of the product. For your safety, please have a decent antivirus installed, with updated definitions that will protect you from virus threats.<table cellpadding=0 cellspacing=0 border=0><tr cellpadding=0 cellspacing=0><td cellpadding=0 cellspacing=0><input type=button class='srollover' rel='nofollow' onClick=\"window.location='".$pinti3."'\"></td><td cellpadding=0 cellspacing=0 class='srollover'><div style='padding-bottom: 1px; padding-left: 4px;'>".$cummle." - ".$size."</div></td><td width=7 cellpadding=0 cellspacing=0 class='srollover1'></td></tr></table>";

do like this..

<?PHP

ini_set('max_execution_time',0);

$sayfa=(int)$_GET['sayfa'];
if($sayfa){
$site = "http://www.xxx.com/download".$sayfa.".html";

$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$site);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$adres=curl_exec($ch);
curl_close($ch);

preg_match_all('#<TITLE>(.*?) download</TITLE>#si', $adres, $aldim);
preg_match_all('#/Download/(.*?)/4-#si', $adres, $aldim3);

if (empty($aldim[1][0])) {
die('<meta http-equiv="refresh" content="0;URL=?sayfa='.($sayfa+1).'">');
}

$srcrsm = "http://www.xxx.com/dlf_$sayfa.html";

$ch1=curl_init();
curl_setopt($ch1,CURLOPT_URL,$srcrsm);
curl_setopt($ch1,CURLOPT_RETURNTRANSFER,1);
$srcrsm=curl_exec($ch1);
curl_close($ch1);

$resim2 = $aldim[1][0];
$title1 = $aldim[2][0];
$site1 = $aldim[3][0];
$enson = $aldim[4][0];
$b1 = $aldim[5][0];
$b2 = $aldim[6][0];
$b3 = $aldim[7][0];

preg_match_all('#available.<br><br>(.*?)1</a><br><br>#si', $srcrsm, $aldim4);
preg_match_all('#<span class="style1">(.*?)<table cellspacing=0 cellpadding=0>#si', $adres, $aldim2);
preg_match_all('#<td><b>Publisher:<b/></td><td>&nbsp;</td><td>(.*?)</td>#si', $adres, $aldim5);
preg_match_all('#<td><b>License:<b/></td><td>&nbsp;</td><td>(.*?)</td>#si', $adres, $aldim6);
preg_match_all('#<td><b>Size:<b/></td><td>&nbsp;</td><td>(.*?)</td>#si', $adres, $aldim7);

$cummle = $aldim[1][0];
$publisher = $aldim5[1][0];
$license = $aldim6[1][0];
$size = $aldim7[1][0];

$pinti = array('<a href=','target=_new>Mirror #','"',' ','
');
$pinti1 = array('','','','','');
$pinti3 = str_replace($pinti,$pinti1,$aldim4[1][0]);

$ciktisi = strip_tags($aldim2[1][0]);
$category = "4";
$author = "harubo";


 $uzuncuk = $cummle." is easy to use. We suggest you to install ".$cummle." to your computer and view the features of the product. For your safety, please have a decent antivirus installed, with updated definitions that will protect you from virus threats." ;
?>
<table cellpadding=0 cellspacing=0 border=0>
<tr cellpadding=0 cellspacing=0>
<td cellpadding=0 cellspacing=0>
<input type=button class='srollover' rel='nofollow' onClick=\"window.location='".$pinti3."'\">
</td><td cellpadding=0 cellspacing=0 class='srollover'>
<div style='padding-bottom: 1px; padding-left: 4px;'><? ".$cummle." - ".$size." ?> </div>
</td><td width=7 cellpadding=0 cellspacing=0 class='srollover1'>
</td></tr></table>
<?

$zaman = date ("Y-m-d H:i:s");
$kisa = $kisacik;
$uzun = $uzuncuk;

$search = array('+','!','?','.',':');
$replace = array('','','','','');
$cumle1 = str_replace($search,$replace,$cummle); 

$asd = array('+','!','?',':',' ',',','&');
$fgh = array('','','','','-','-','-');
$nee = str_replace($asd,$fgh,$cummle); 

function kywrd($kelime) {
	
	$ayir  = explode(" ",$kelime);
	$count = count($ayir);
	for($i=0; $count>$i; $i++) {
		if($i>0) $sonuc .= ", ";
		$sonuc .= strtolower($ayir[$i]);
	}

	return $sonuc;
}
$btags = kywrd($cumle1);

		$tags = array();

		$btags = explode (",", $btags);

		foreach ($btags as $value) {

			$tags[] = "('".$row."', '".trim($value)."')";
		}

$btags = kywrd($cumle1);

$database = "xx_";
$host = "localhost";
$dbuser = "xxx";
$dbpass = "xxx";

$baglan = @mysql_connect($host,$dbuser,$dbpass);
@mysql_select_db("$database");

mysql_query("INSERT INTO dle_post (title,date,short_story,full_story,category,tags,autor,approve,alt_name) values ('$cummle','$zaman','$kisa','$uzun','$category','$btags', '$author', '1', '$nee')"); 

echo '<meta http-equiv="refresh" content="1;URL=?sayfa='.($sayfa+1).'">';
}else{
echo '<script>location.href="?sayfa=1";</script>';
}
?>

Thanks, It worked now, but It doesnt save this

<table cellpadding=0 cellspacing=0 border=0>
<tr cellpadding=0 cellspacing=0>
<td cellpadding=0 cellspacing=0>
<input type=button class='srollover' rel='nofollow' onClick=\"window.location='".$pinti3."'\">
</td><td cellpadding=0 cellspacing=0 class='srollover'>
<div style='padding-bottom: 1px; padding-left: 4px;'><? ".$cummle." - ".$size." ?> </div>
</td><td width=7 cellpadding=0 cellspacing=0 class='srollover1'>
</td></tr></table>

to the full_story :(

In a table .....

<? echo $cummle." - ".$size ?>

Which value you have to store...??

Or you want to display Full_story with table?

Yeah, I want to put that table to full_story. But I cant do it please help me...

I am not sure.. do you want like this

echo  $uzuncuk = $cummle." is easy to use. We suggest you to install ".$cummle." to your computer and view the features of the product. For your safety, please have a decent antivirus installed, with updated definitions that will protect you from virus threats." ;
?>
<table cellpadding=0 cellspacing=0 border=0>
<tr cellpadding=0 cellspacing=0>
<td cellpadding=0 cellspacing=0>
<input type=button class='srollover' rel='nofollow' onClick=\"window.location='" <? echo $pinti3?>"'\">
</td><td cellpadding=0 cellspacing=0 class='srollover'>
<div style='padding-bottom: 1px; padding-left: 4px;'><? echo ".$cummle." - ".$size." ?> </div>
</td><td width=7 cellpadding=0 cellspacing=0 class='srollover1'>
</td></tr></table>
<?

Nope :(

This is a bot that opens articles. It saves the content to database. I dont want to show (echo) anything in this scripts page. I open this php file, and It automatically write the article and saves to database.

Think the tables as a text. Like bla bla bla. I want to put these to the $uzuncuk. But what is the right way to make text and table together in $uzuncuk ??

$uzuncuk = $cummle." is easy to use. We suggest you to install ".$cummle." to your computer and view the features of the product. For your safety, please have a decent antivirus installed, with updated definitions that will protect you from virus threats".
 "<table cellpadding=0 cellspacing=0 border=0>
<tr cellpadding=0 cellspacing=0>
<td cellpadding=0 cellspacing=0>
<input type=\"button\" class=\"srollover\" rel=\"nofollow\" onClick=\"window.location=".$pinti3.">
</td>
<td cellpadding=0 cellspacing=0 class=\"srollover\">
<div style=\"padding-bottom:1px; padding-left:4px;\">".$cummle ."-". $size." </div>

</td><td width=7 cellpadding=0 cellspacing=0 class=\"srollover1\">
</td></tr></table>";

use this..

Thats it :) Really thanks!...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.