Ondrej Posted March 11 Share Posted March 11 Hello. I am sending a link to insert a record into MySql in php crip.... It doesn't work for me... link: htp................hhhhhhhhh.online/novycisalk.php?klucik=klklklkl,&name=aaaaaaaa PHP script: Quote Link to comment https://forums.phpfreaks.com/topic/318986-mysql-insert/ Share on other sites More sharing options...
Ondrej Posted March 11 Author Share Posted March 11 Correction ... in the link is not ...&name.... but ....&nazov....... Ondrej Quote Link to comment https://forums.phpfreaks.com/topic/318986-mysql-insert/#findComment-1617601 Share on other sites More sharing options...
Barand Posted March 11 Share Posted March 11 Put this line mysqli_report(MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT); just before your "$conn = new mysqli(...)" and see what the error message says when you attempt the insert. Quote Link to comment https://forums.phpfreaks.com/topic/318986-mysql-insert/#findComment-1617605 Share on other sites More sharing options...
ginerjm Posted March 11 Share Posted March 11 Do you have php error checking enabled? I dont think so. How do you know that $_POST['nazov'] actually exists? What is this line supposed to do for you? : if ($klucik = $SQLKEY) I ask that since this is an assignent, not a valid test which I think is what you are looking for. I could probably go on but these 2 lines are enough for now. Quote Link to comment https://forums.phpfreaks.com/topic/318986-mysql-insert/#findComment-1617610 Share on other sites More sharing options...
Barand Posted March 11 Share Posted March 11 As you are sending data via the url querystring you should be using $_GET, not $_POST. Key/value pairs in the querystring should not be comma-separated Quote Link to comment https://forums.phpfreaks.com/topic/318986-mysql-insert/#findComment-1617612 Share on other sites More sharing options...
gizmola Posted March 15 Share Posted March 15 For future reference, please use the code tags feature of the forum, and not a picture of your code. Quote Link to comment https://forums.phpfreaks.com/topic/318986-mysql-insert/#findComment-1617924 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.