jamesxg1 Posted March 3, 2009 Share Posted March 3, 2009 <?php session_start(); include("conf.inc.php"); $sql2 = "SELECT * FROM `settings`"; $query = mysql_query($sql2); while ($settings = mysql_fetch_assoc($query)) { $vone = $settings['vone']; mysql_query($sql2) or die(mysql_error()); } if(isset($_POST['submit'])) { $vone = strip_tags(mysql_real_escape_string($_POST['vone'])); $sql = "UPDATE settings SET vone = '$vone'"; mysql_query($sql) or die(mysql_error()); header("Location: ../index.php"); exit; } ?> <script type="text/javascript"> function capitalize(input) { val = input.value; newVal = ''; val = val.split(' '); for(var i = 0; i < val.length; i++) { newVal += val[i].substring(0,1).toUpperCase() + val[i].substring(1).toLowerCase() + ' '; } input.value = newVal; } </script> <form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <textarea rows="5" cols="40" name="vone" id="$vone" onChange="capitalize(this);"><?php print $vone ?></textarea> <P ALIGN=CENTER><input type="submit" name="submit" value="Submit"></P> </form> i dont understand what is wrong i get this error Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\simple\admin\vone.php on line 12 Link to comment https://forums.phpfreaks.com/topic/147678-solved-mysql-wont-update-s/ Share on other sites More sharing options...
jamesxg1 Posted March 3, 2009 Author Share Posted March 3, 2009 Anyone have any idea's ? Link to comment https://forums.phpfreaks.com/topic/147678-solved-mysql-wont-update-s/#findComment-775202 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.