Click here to Skip to main content
14,974,886 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi! how to insert date and time using real_escape_string?

What I have tried:

PHP
$query = "insert into tbltopics
set categories = '".$con->real_escape_string($_POST['categories'])."',
message = '".$con->real_escape_string($_POST['message'])."',
date = ? postedby = '".$con->real_escape_string($_SESSION['Username'])."'";
Posted
Updated 24-Mar-17 4:32am
v3
Comments
Bryian Tan 24-Mar-17 9:59am
   
this part "date = ? postedby =" look weird, copy paste issue or typos?
Jim Clinton 24-Mar-17 16:02pm
   
yes

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900