PHP variable not updating in to MYSQl field -


i have piece of code takes keywords out of url database. code updates field within database keywords. code gets keywords url , echo's them out on page perfectly.

however when try , update them in database, field doesn't update. if swap out variable $c word such test works , issue variable $c, have tried several different ways can not field update.

 $result = mysql_query("select * ip_stats1 page   'http://www.google.com/uds/afs?q=%' , id='44'")  or die(mysql_error());    $row = mysql_fetch_array( $result );    $keyword = $row['page'];     $id = $row['id'];   $a = "$keyword";   $b = substr($a, strpos($a, '=') + 1);   print $b;   $c = substr($b, 0, strpos($b, '$'));   echo "$c";   $result2 = mysql_query("update ip_stats1 set string1 = '$c' id = '44'")   or die(mysql_error());  

update

ok, if echo $c keywords, example dough maker, works perfectly. have tried writing this.

 $test = $c;  

and test returns same result. loop , took of results fro database produce long list, in effort try , find error removed loop return 1 result.

ok, firstly suggestions, tried various things , in end realised silly error. variable $b holds information want , inserted database worked fine.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -