Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

post mysql query

$
0
0

hi all 

<?php
if (substr($_POST['tag'], 0, 15) == 'chave|commando|'){
include 'db_con.php';
session_start();
$sql = substr($_POST['tag'], 15, 2000);						
$result = mysql_query($sql);
mysql_close($con);
echo $results;
} else { 
"<script>window.location = 'http://www.google.com'</script>";
}
?>

the tag recive "Update config_hal SET pgtobtn = 5 " if i send the tag like that this works fine ...

if i try to send like that  "Update config_hal SET pgtobtn = N " this dont work...

i know that i should write something like this "Update config_hal SET pgtobtn = 'N' " but also dont work 

can anybody tellme whats wrong with my code????


Viewing all articles
Browse latest Browse all 13200

Trending Articles