What do I need to add below to update the current date/time? I have a field in the database called datetime. I tried to use Now() but its not working.
Code: <?php
$con = mysql_connect("host" , "aaaaa" , "pw");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("aaaaa", $con);
mysql_query("update application set comment='".mysql_real_escape_string($_POST[comment])."' where `name`='".mysql_real_escape_string($_POST[name])."'");
/*This is what I tried to add so that i can directly inject the current date/time*/
$sql="INSERT INTO application (datetime)
VALUES(NOW())";
mysql_close($con)
?>
Sufficient protection from bad input?
I am writing a simple script to let people upload 'pages' of their own content, be it simply a few bits of HTML, pictures and whatnot, and recieve their own url.. I've without testing, wrote this part
Last character removed
I have created a string from an array. I have inserted commas from my form values. I am trying to remove the last comma from the string and can't seem to remove it. I have tried chop, rtrim, substr,
Stats of viewers
Hello. I have a website in php and people can login. I want to make an admin control panel where u can see how many people are currently logged in and also how many people in total (including the ones
Custom array sort? asc then desc
Any ideas how I could sort this array? I've been trying for a while. Maybe with usort, but I have no idea how... Each entry is laid out like this: ("$status||$id||$shop||$name||$date")I
filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I have a method, that is supposed to open a file and write to the file, but I am having issues. Each
How could I combine these arrays??
Hello.. I'm trying to figure out a way to combine these first two arrays to get the last array.. 1st array:Code: Array( [0] => zero [1] => one [2] => two)2nd array:Code:
undefined offset help
Hi All,I kept getting undefined offset PHP notice for a simple for loop. For eg$va = array();$i=0;while($row = mysql_fetch_array($result)){ $va[$i] = $row['id']; $i++;}It gives undefined offset at
Load Animated Image while cache is serve
I have a page that loads up using cache and took about 1 to 2 minutes before it loads to the page. Is there a way that while the cache is being pulled out and then disappear once the cache is
search function
HI guys,if anyone could point us in the right direction of how to do this, or provide some test code for a similar problem would be great!Basically, I have user profiles on my site, and I have a
LinkedList help
Ok so I just learned quickly about lists, so I have a not too hard project I think, but am having a few issues:Here is the project. Create a lovely polynomial calculator, that takes the equation from