Building the structure HTML : 2:00 * CREATE the db: 6:24 Start working on process.php file 7:38 Check if save button has been clicked 8:38 Create end and delete button 19:13 Creating the table above the 11:49 Showing you the data with pre_r() function 12:50 * READ from the db 17:07 * DELETE a record from the db 21:04 Start the SESSION 22:39 Click edit and display 27:16 Make sure the record exists: 28:33 * Update records from db 32:48
It is a bad practice to write a connect line to connect to the database on every file. The reason why you should not do it is because whenever you have to move the project from your localhost to the actual server, you will have to edit the database info on every file. It is better to have one single file connecting to the database and just include it whenever you need it. Then you can edit one single file when moving project to the server. But thanks for the video, I learnt a lot following up the steps!
The best PHP CRUD tutorial to ever exist on the planet, it explains everything that i took ages struggling on doing it successful and in most efficient way. Thank you clever techie, i love your tutorials.
This is by far the most successful tutorial I've watched on PHP, MYSQL. I'd love to see a video on search function in the database, and pagination. Also, it would be good if you could depend on CSS3 instead of Bootstrap. I really appreciate the work. Thanks.
wow that's perfect for coding without a framework. For the basic CRUD, everything has been thought and is decoupled between front end vs back end. Nice works! Another good video would be to show how to protect from SQL Injection, XSS, etc.
Great video, I'm usually very annoyed with youtube tutorials because people tend to skip the basics to an extent that it's very difficult to follow along unless you've already done alot of coding in the language, which you usually haven't done if you're watching a tutorial. So kudos for being thurough!
No need for a hidden input. First, add a new line: $id = $row['id'] in the IF block for fetching name and location. Then, in index.php add to the UPDATE button this value -> [value ="] . So now the id is sent to $_POST array when clicking the update button
there is no sentence exist like"one of the best tutroial ". i'ld like to share my honest opinion this the no.1 best tutoriall ever i found in youtube..thnks clever techie
This is a very good tutorial! Thank you Clever Techie! If you ever encounter that your Delete Message Alert is not display... Put a die() function right after the header('location: index.php'); It will look like this: if (isset($_GET['delete'])){ $id = $_GET['delete']; $mysqli->query("DELETE FROM data WHERE id = $id") or die( $mysqli->error()); $_SESSION['message'] = "Record has been deleted!"; $_SESSION['msg_type'] = "danger"; header('location: index.php'); die(); }
Best crud tutorials so far, every is explained so clear that I am quite confident that I can write this part from scratch too without stealing other's code that I actually do not quite understand.
29:15 Process.php line 34 array warning error due to count function use this function error will be finished if (array($result) !==null){ $row = $result->fetch_array(); $name = $row['name']; $location = $row['location'];
Warning: count(): Parameter must be an array or an object that implements Countable in dashboard\projectCrud\process.php on line 36 Replace: if(count($result)==1){ $row = result-fetch_array(); by: if ($result->num_rows){ $row = $result->fetch_array();
23:41 : Only problem I've had is that the div that handles the alerts will show the alert-success, but when the delete button is pressed on a record the alert-danger does not show up.
I had some issues but i did it worked perfectly, very nice tutorial . Please upload videos like this , i would totaly love to watch and learn from them .
im getting this message error , how to fix it Notice: Undefined variable: mysqli_error in C:\xampp\htdocs\log\process.php on line 35 Fatal error: Uncaught Error: Function name must be a string in C:\xampp\htdocs\log\process.php:35 Stack trace: #0 C:\xampp\htdocs\log\crud.php(10): require_once() #1 {main} thrown in C:\xampp\htdocs\log\process.php on line 35
@Harold Mendes Doesn't work for me "count():Parameter must be an array or an object that implements Countable; it gives this error when I click edit button."
Hi. i am new, even its my first time starting php. i have done everything same. rest is working but for updation, as you had 30:05 the error, after initialising the variables i am still having the same error and also when i press update button the values do not come to the text boxes.. please help..!
i have got the same problem, and i fixed the variables , you have to be sure that the database variables are initialized with empty string , and mine were named differently from the names of the text boxes and i was not initializing the database variables, but i still have no clue why the edit button isnt working :(
@@АлександринаМихова now i fixed the errors but problem remaims same. My program doesn't shows the values. It brings back the empty values. I checked step by step. 1. Calling process.php is ok. 2. Selection from database works prefect. 3. Required values assigned to the variables and when echo in process.php, works good. But when redirect to index.php. variables are empty string. 😥
@@imrandanish6242 i think i found the answer, your edit cannot be in another php file, because when you redirect the data is not saved so you need to move your edit to the index page
Really thank you very much. The most helpful and comprehensive video about php I have watched. You answered nearly all my questions in this video. Thank you again and again
i dont mean to be off topic but does someone know a trick to get back into an instagram account?? I was stupid forgot my login password. I would appreciate any tricks you can offer me!
@Bodie Ismael thanks for your reply. I found the site thru google and im in the hacking process now. Looks like it's gonna take a while so I will reply here later with my results.
Try checking if your delete button references the process.php, i was having the same problem, and mine was refering the index.php, afther the change it worked fine for me
I'm sorry I am new to programming I am developing my first CRUD app and this tutorial is amazing. Is it necessary to use NetBeans as an IDE Or can I simply use VS Code? Thanks!
Error No1 : Warning: count(): Parameter must be an array or an object that implements Countable in C:\php\www\Sample\process.php on line 39 Error No2: Error: Call to a member function fetch_array() on boolean in C:\php\www\Sample\process.php on line 40 Everything else works perfectly only these two errors when the edit button is clicked. Any solutions?
Great tutorial, thank you for all your super-helpful videos! I am following along step-by-step and have encountered an issue at the ‘Edit’ user section. You put your ‘SELECT * FROM data WHERE id = $_GET[‘edit’]’ query and variable-setting logic in the process.php file as if it was supposed to be called when the Edit button is clicked. But, the Edit button’s href target is itself, the index.php page. How is the code in process.php to retrieve the selected user’s record being invoked and how are the updated $name and $location variables getting passed back to index.php? I had to put the query and variable-setting logic in the index.php file above the add/edit form to get it to work. I thought I was getting this really well but am really confused now - I don’t understand how your code works since: 1) you aren’t calling the process.php file when you click an ‘Edit’ button, 2) nor are you passing any SESSION or GET variables back to index.php from the Edit code in process.php even if you got there somehow. I’m sure I’m missing something obvious but I am stumped right now. Thanks!
Just assign variable as id, use ' for variables in the query.. if (isset($_POST['update'])) { $id = $_POST['id']; $name = $_POST['name']; $location = $_POST['location']; $result = $mysqli->query("UPDATE data SET name = '$name', location = '$location' WHERE id = $id") or die($mysqli->error); $_SESSION['message'] = "Record has been updated"; $_SESSION['msg_type'] = "warning"; header("location: index.php"); }
Hi! Great video. I really enjoyed it. Quick question... at approx 11:00 when you successfully added the first entry into database how do you prevent duplicate entry on refresh?
GREAT TUTORIAL MUST CHECK FOR MAKING RESPONSIVE WEBSITE . COMPLETLY WORKING AND HELPED A LOT FOR COMPLETING MY PROJECT. thank you sir for making these video for us.
thank you Mr Clever Techie for the good tutorial but i had this error when i press update button (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1) please help me on this.
Can anyone help, I got an error on the EDIT part @31:02 I copied the exact code but I got this error: "Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM data WHERE id=9' at line 1 in C:\xampp\htdocs\tutorial\process.php:38 Stack trace: #0 C:\xampp\htdocs\tutorial\process.php(38): mysqli->query('SELECT FROM dat...') #1 C:\xampp\htdocs\tutorial\employees.php(117): require_once('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\tutorial\process.php on line 38"
Try to check the $mysqli->("UPDATE data SET name='$name', location='$location' WHERE id=$id") or die($mysqli->error); line in process.php very carefully, i had one comma in wrong spot and got the same error
hi this is probably the most helpful tutorial I've watched thus far so thank you so much! However i am trying to accomplish this task using bootstrap modals? how would i implement this? I am a beginner to coding and have been struggling with this all week... would really really appreciate it if you could provide guidance on this! Thanks
Thanks for the video sir. I have a doubt sir. If we have thousands of records in the table, instead of displaying all records shall we search a record with a id num and display it in the form itself and set two buttons next and previous for moving to the next record or the previous one.
Hi Clever Techie, I am facing this error: Warning: count(): Parameter must be an array or an object that implements Countable in C:\wamp64\www\PHP\process.php on line 36 This happens when i click the edit button
I change the count() function to mysqli_num_rows() if(mysqli_num_rows($result)==1){ $row = $result->fetch_array(); $name = $row['name']; $location = $row['location']; }
@@krysteela it didn't result on something, it becomes a blind error where I click and nothing happens not even an error report. Been googling for ages but can't find a solution.
can I ask why did you require the process.php before the action attribute. I understand why for the action attribute but why add it before also what will happen if you don't. Thank you
i downloaded net beans and teh "bshtml" that you have been used is not working its not generating any codes like your screen showing please help me to do that
if i put sql code then it wont even open. only echo staements like are running. if i put mysqli statement anywhere then even index.php will not open nor it gives error. i dont know how to solve this. im using xampp
Thanks very much, your video helped me build an Simple CRM (added many more things the way you did). Can you tell how to replace text input with dropdown list and save it to the database and then display it from database like you to the form??
I get this error when I click the Edit button - Warning: count(): Parameter must be an array or an object that implements Countable in process.php on line 42
I already fixed it. I change the count() function to mysqli_num_rows() if(mysqli_num_rows($result)==1){ $row = $result->fetch_array(); $name = $row['name']; $location = $row['location']; }
In case your query doesn't successfully insert data into the table (10:56) yet doesn't display any errors. This will fix it : if(isset($_POST["save"])){ $name=strval($_POST["name"]); /*This makes sure that what you are passing to the query is a String*/ //echo $name; /* Uncomment to make sure the POST method succeeded $location=strval($_POST["location"]); //echo $location; $mysqli->query("INSERT INTO `data` (`name`, `location`) VALUES ('$name', '$location')") /*Notice the single quotes ' ' */ or die(mysqli_error($mysqli)) ; }
when you push the button EDIT why it doesnt show the white screen? you dont have a header with location. so it must proceed to your script? it works like that for me so i dont get how to paste data into inputs. they are just empty
*The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.* i got this at last
Building the structure HTML : 2:00
* CREATE the db: 6:24
Start working on process.php file 7:38
Check if save button has been clicked 8:38
Create end and delete button 19:13
Creating the table above the 11:49
Showing you the data with pre_r() function 12:50
* READ from the db 17:07
* DELETE a record from the db 21:04
Start the SESSION 22:39
Click edit and display 27:16
Make sure the record exists: 28:33
* Update records from db 32:48
Bro we can do this code in notepad ++ right?
@@Hey-hv6oo Sure, why not?
@@gulfelectro Can you help me?Parse error: syntax error, unexpected 'else' (T_ELSE), expecting end of file in C:\xampp\htdocs\Crud\index.php
That is for Update
It is a bad practice to write a connect line to connect to the database on every file. The reason why you should not do it is because whenever you have to move the project from your localhost to the actual server, you will have to edit the database info on every file. It is better to have one single file connecting to the database and just include it whenever you need it. Then you can edit one single file when moving project to the server. But thanks for the video, I learnt a lot following up the steps!
Ever tried xcrud . Google it such a nice framework
The best PHP CRUD tutorial to ever exist on the planet, it explains everything that i took ages struggling on doing it successful and in most efficient way. Thank you clever techie, i love your tutorials.
I agree
I agree too!
This is by far the most successful tutorial I've watched on PHP, MYSQL. I'd love to see a video on search function in the database, and pagination. Also, it would be good if you could depend on CSS3 instead of Bootstrap. I really appreciate the work. Thanks.
Thank you for the suggestions, I already have a video on pagination, will probably release one on search soon, stay tuned!
shalaw Fatah why css3 bro , if Bootstrap provides responsive styling just doubt!
@@clevertechie Have you released the video on database search?
wow that's perfect for coding without a framework. For the basic CRUD, everything has been thought and is decoupled between front end vs back end. Nice works! Another good video would be to show how to protect from SQL Injection, XSS, etc.
Great video, I'm usually very annoyed with youtube tutorials because people tend to skip the basics to an extent that it's very difficult to follow along unless you've already done alot of coding in the language, which you usually haven't done if you're watching a tutorial.
So kudos for being thurough!
except he skips shit right from the start. obvious bought comments are obvious
No need for a hidden input. First, add a new line: $id = $row['id'] in the IF block for fetching name and location. Then, in index.php add to the UPDATE button this value -> [value ="] . So now the id is sent to $_POST array when clicking the update button
Thank You Man This really helped
i hope you can help me with this I don't understand where to put the code. , is it on the process.php or in the index.php?
there is no sentence exist like"one of the best tutroial ". i'ld like to share my honest opinion this the no.1 best tutoriall ever i found in youtube..thnks clever techie
I really appreciate that!
this is the most powerful (perfect) video about PHP crud i have ever seen
Thank you for this! I got a little bit lost, but when i started it again then just focus hardly on what you're doing, i got it right! Tysm!
i got an error on $result variable inside if count condition when i am putting the terminator after initialization the row variable. 29:02
i am on my third day in php and this is the best tutorial i have encountered
Congrats. One of the best PHP tutorials I've seen so far! Well done.
This is a very good tutorial! Thank you Clever Techie!
If you ever encounter that your Delete Message Alert is not display...
Put a die() function right after the header('location: index.php');
It will look like this:
if (isset($_GET['delete'])){
$id = $_GET['delete'];
$mysqli->query("DELETE FROM data WHERE id = $id") or die( $mysqli->error());
$_SESSION['message'] = "Record has been deleted!";
$_SESSION['msg_type'] = "danger";
header('location: index.php');
die();
}
Thanks!!!!
Best crud tutorials so far, every is explained so clear that I am quite confident that I can write this part from scratch too without stealing other's code that I actually do not quite understand.
It work ?
Yes, it works like a charm. Have u encountered any problem?
29:15 Process.php line 34 array warning error due to count function use this function error will be finished
if (array($result) !==null){
$row = $result->fetch_array();
$name = $row['name'];
$location = $row['location'];
Great
$row = $result->fetch_array();
if ($row){
$name = $row['name'];
$location = $row['location'];
}
thank you for saving me time^^
Thanks a lot
I'm really shoked to see this tuto...because u saved million of time of others... Thanks a lot for such a good tuto ..
Hey man, I hope you're doing good, just wanted to thank you for posting this amazing tutorial, it really has helped me a lot, cheers!
Warning: count(): Parameter must be an array or an object that implements Countable in dashboard\projectCrud\process.php on line 36
Replace:
if(count($result)==1){
$row = result-fetch_array();
by:
if ($result->num_rows){
$row = $result->fetch_array();
thank u! ^_
thanks man this really helped me a lot
dafuq is num_rows
Parse error: syntax error, unexpected identifier "pre_r" in C:\xampp\htdocs\ARCHIVE-EDITED\announcement.php on line 207 how about this?
Thank You
finally my first PHP crud app is made. thanks clever techie. your way of demonstrating each step is very nice
function count() is incorrect.
Solution: if($result->num_rows){
$row = $result->fetch_array();
is this because of the version of php?
@@marcelinolibrada6761 I think so. (Smiles)
Thanks a lot
@@andreluisdacostapaes1361 can you specify how can i modify that code ? i still don't understand
thanks... it helps a lot
23:41 : Only problem I've had is that the div that handles the alerts will show the alert-success, but when the delete button is pressed on a record the alert-danger does not show up.
I had some issues but i did it worked perfectly, very nice tutorial . Please upload videos like this , i would totaly love to watch and learn from them .
Thorough and EASY - as all things should be (LOL!). 5 stars on all metrics
*keep it coming I can watch them all
stucked at 30:58, i cannot determine the problem, nor error, but the name and location are not showing in the placeholder.
Oooh, this is a fantastic video! Your picture describing CRUD to the analagous SQL statements is brilliant content. Thank you!
Near 24:07 , my success alert shows up while delete alert does not, even though the delete is deleting from the database.
MY edit process did not work with de if(count($result==1)). I did need to change to $results->num_rows to work. Why?
im getting this message error , how to fix it
Notice: Undefined variable: mysqli_error in C:\xampp\htdocs\log\process.php on line 35
Fatal error: Uncaught Error: Function name must be a string in C:\xampp\htdocs\log\process.php:35 Stack trace: #0 C:\xampp\htdocs\log\crud.php(10): require_once() #1 {main} thrown in C:\xampp\htdocs\log\process.php on line 35
@Harold Mendes not phpmyadmin but PHP
You really helped me passing the 12º grade ty my brother!!!
please help! :(
count():Parameter must be an array or an object that implements Countable; it gives this error when I click edit button.
@Harold Mendes Thank you, this is worked for me.
@Harold Mendes Thank you!
@Harold Mendes Doesn't worked for me , just a blank page in localhost/...edit=2
@Harold Mendes Doesn't work for me "count():Parameter must be an array or an object that implements Countable; it gives this error when I click edit button."
This is the best CRUD Tutorial I have ever studied. Thanks a lot Sir.
Edit button not working when compared to video position-> 27:04 .
THX YOU, DUDE! REALY! I HAVE TROUBLE FOR 4 DAY WITH LABS FROM MY UNIVERSITY WITH THIS SHIT. YOU HELP ME SO MUCH!
i've been using this video and it's really helping me a lot, because i was having a lot of errors and thx to your video i'm goin thru all them
Hi! if you want to learn, The Complete PHP MySQL Professional Course with 5 Projects. here is a link.
ruclips.net/video/4x3FhyS8muc/видео.html
Great Content Techie...
People will really appreciate your work...
Thank you brother.
18:24 - syntax error, unexpected 'endwhile' (T_ENDWHILE), expecting end of file - I wrote this but got an error -
Please help
try this one -> . Hope this helps.
2nd file
code is given if you need i will SHARE IT
Youre TUTORIAL IS THE BEST i found so far . BIG THANKS exactly like i need the details of the code. Very nice.
When i click update it just shows me a blank page. Doesnt update the database also. Just takes me to process.php. Please help!
Check that name and location variables goes to process page.
same with me .. did you solve this??
Hi. i am new, even its my first time starting php.
i have done everything same. rest is working but for updation,
as you had 30:05 the error, after initialising the variables i am still having the same error and also when i press update button the values do not come to the text boxes..
please help..!
i have got the same problem, and i fixed the variables , you have to be sure that the database variables are initialized with empty string , and mine were named differently from the names of the text boxes and i was not initializing the database variables, but i still have no clue why the edit button isnt working :(
@@АлександринаМихова now i fixed the errors but problem remaims same. My program doesn't shows the values. It brings back the empty values.
I checked step by step.
1. Calling process.php is ok.
2. Selection from database works prefect.
3. Required values assigned to the variables and when echo in process.php, works good.
But when redirect to index.php. variables are empty string. 😥
@@imrandanish6242 i think i found the answer, your edit cannot be in another php file, because when you redirect the data is not saved so you need to move your edit to the index page
@@АлександринаМихова yeah it reset the variables i understand. but then how did he do in the tutorial? How is it possible for him?
i have a prb.. when i insert data into the table i cant find it added on phpmyadmin why???
Really thank you very much. The most helpful and comprehensive video about php I have watched. You answered nearly all my questions in this video. Thank you again and again
You are welcome!
when I click on the side my edit button doesn't turn back to save button. It stays stuck onto update :/
Thanks a lot man, it was very very interesting the whole 2 days that took me to make this. Can't wait to start seeing your other videos
i dont mean to be off topic but does someone know a trick to get back into an instagram account??
I was stupid forgot my login password. I would appreciate any tricks you can offer me!
@Daxton Jace instablaster :)
@Bodie Ismael thanks for your reply. I found the site thru google and im in the hacking process now.
Looks like it's gonna take a while so I will reply here later with my results.
@Bodie Ismael it did the trick and I actually got access to my account again. I am so happy!
Thanks so much you saved my ass :D
@Daxton Jace Glad I could help xD
This was great and exactly what I needed for the business website I’m building. What do you think about adding a “confirm delete” function?
I got a error when using Count on line 35, "Parameter must be an array or an object that implements Countable", but $result is a object, any help?
thanks,
i want to understand why if(@count($result)==1) is error? (without@)
great video . But when I saved a record alert is not display . and when I delete record alert message was displayed. what is the problem?
Same problem for me also
Please provide a solution
Thank you for this tutorial I really appreciate it. It helps us with our capstone for our backend, Kudos Cleaver Techie 💪💖
Glad you like it!
25:25 My delete message doesnt come up, it just deletes it and thats it...I did everything the same.
Try checking if your delete button references the process.php, i was having the same problem, and mine was refering the index.php, afther the change it worked fine for me
I'm sorry I am new to programming I am developing my first CRUD app and this tutorial is amazing. Is it necessary to use NetBeans as an IDE Or can I simply use VS Code? Thanks!
Error No1 : Warning: count(): Parameter must be an array or an object that implements Countable in C:\php\www\Sample\process.php on line 39
Error No2: Error: Call to a member function fetch_array() on boolean in C:\php\www\Sample\process.php on line 40
Everything else works perfectly only these two errors when the edit button is clicked. Any solutions?
write *mysqli_num_rows($result) == 1* instead
@@dandi2864 It works for me! Thx!
thank you bro it worked for me
How about if the form for adding a data is another php file and they wan to edit it there. ?
The save message appears, but the delete message doesn't appear
at 4:58 what application or website are you using. It says Notebooks in the top header area.
I'm quite sure it is Microsoft OneNote but don't ask me for the exact version. You can download it and use it for free on many operating systems. :)
Great tutorial, thank you for all your super-helpful videos! I am following along step-by-step and have encountered an issue at the ‘Edit’ user section.
You put your ‘SELECT * FROM data WHERE id = $_GET[‘edit’]’ query and variable-setting logic in the process.php file as if it was supposed to be called when the Edit button is clicked. But, the Edit button’s href target is itself, the index.php page. How is the code in process.php to retrieve the selected user’s record being invoked and how are the updated $name and $location variables getting passed back to index.php?
I had to put the query and variable-setting logic in the index.php file above the add/edit form to get it to work.
I thought I was getting this really well but am really confused now - I don’t understand how your code works since:
1) you aren’t calling the process.php file when you click an ‘Edit’ button,
2) nor are you passing any SESSION or GET variables back to index.php from the Edit code in process.php even if you got there somehow.
I’m sure I’m missing something obvious but I am stumped right now.
Thanks!
The way i solved this is by putting that code in a seprete file and including it at the top of my page. But i dont know how he did it
Just assign variable as id, use ' for variables in the query..
if (isset($_POST['update'])) {
$id = $_POST['id'];
$name = $_POST['name'];
$location = $_POST['location'];
$result = $mysqli->query("UPDATE data SET name = '$name', location = '$location' WHERE id = $id") or die($mysqli->error);
$_SESSION['message'] = "Record has been updated";
$_SESSION['msg_type'] = "warning";
header("location: index.php");
}
Rock Shan Thanks!
@@rockshan6306 Thank you very much!
Steve Carter, and thank you very much for your good question.
Hi! Great video. I really enjoyed it. Quick question... at approx 11:00 when you successfully added the first entry into database how do you prevent duplicate entry on refresh?
@Eve Angel Thank you! Good idea.
Parse error: syntax error, unexpected '$_SESSION' (T_VARIABLE) in
please help
This is the well-paced nuts & bolts tutorial I've been looking for, thumbs up!
Hi, I have a trouble with edit function. If I clicked the edit, it gets id correctly, but my window(browser) gets into blank page. Anyone can help?
Had problems with some old MYSQL functions that don't work in MYSQLI but overall everything was perfect, thank you so much!
I'm still having problems because of this. Can you share the source code?
How did you test your connection on 08:07?
Such a good tutorial! Learned a lot. Also about your cheat sheets. Clever to have code in your notes to easy copy/paste. Thank you :)
GREAT TUTORIAL MUST CHECK FOR MAKING RESPONSIVE WEBSITE . COMPLETLY WORKING AND HELPED A LOT FOR COMPLETING MY PROJECT.
thank you sir for making these video for us.
thank you Mr Clever Techie for the good tutorial but i had this error when i press update button (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1) please help me on this.
good afternoon, thank you for your video , my name is Figo from Indonesia, I want to ask what support applications are you using in this video?
Your video is very helpful...
What is the piece of software you keep the books on the right hand side of screen?
For delete fuction must be a confirmation message firt before delete action
whats the software you are using to maintain the notebooks and other stuff as at 3:28.
OneNote
Can anyone help, I got an error on the EDIT part @31:02
I copied the exact code but I got this error:
"Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM data WHERE id=9' at line 1 in C:\xampp\htdocs\tutorial\process.php:38 Stack trace: #0 C:\xampp\htdocs\tutorial\process.php(38): mysqli->query('SELECT FROM dat...') #1 C:\xampp\htdocs\tutorial\employees.php(117): require_once('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\tutorial\process.php on line 38"
It was referring to this line:
$result = $mysqli->query("SELECT FROM data WHERE id=$id") or die($mysqli->error());
Thumbs up from Pakistan helped me a lot in my subject Web-Eng assignment on CRUD in University of Lahore. Thanks.
Thank you very much I was struggling with the update operation for hours and u saved me! by the way it's my first video to watch in your channel!
question: why use GET for deleting and editing? isnt that very dangerous because someone could easily do it via url?
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
Try to check the $mysqli->("UPDATE data SET name='$name', location='$location' WHERE id=$id") or die($mysqli->error); line in process.php very carefully, i had one comma in wrong spot and got the same error
@@MHMtt66 got the same error any solution ?
hi this is probably the most helpful tutorial I've watched thus far so thank you so much! However i am trying to accomplish this task using bootstrap modals? how would i implement this? I am a beginner to coding and have been struggling with this all week... would really really appreciate it if you could provide guidance on this! Thanks
This helped me out so much!! I was wondering how this could be used if there were multiple tables in the database and not just the data table
Perfect and easy! Thank you very much and greetings from Hungary!
Greetings! I get errors in the if statement in the editing part of the process. why is that? hope you can help me
Thanks for the video sir. I have a doubt sir. If we have thousands of records in the table, instead of displaying all records shall we search a record with a id num and display it in the form itself and set two buttons next and previous for moving to the next record or the previous one.
By far one of the best turorials!
I'm still getting the 'notice undeclared variable' error even when using the empty string... anyone else know about this or how to fix? thanks
Hi Clever Techie, I am facing this error: Warning: count(): Parameter must be an array or an object that implements Countable in C:\wamp64\www\PHP\process.php on line 36
This happens when i click the edit button
I change the count() function to mysqli_num_rows()
if(mysqli_num_rows($result)==1){
$row = $result->fetch_array();
$name = $row['name'];
$location = $row['location'];
}
@@krysteela it didn't result on something, it becomes a blind error where I click and nothing happens not even an error report. Been googling for ages but can't find a solution.
can I ask why did you require the process.php before the action attribute. I understand why for the action attribute but why add it before also what will happen if you don't. Thank you
I also enjoyed the tutorial very much. Very useful. I also like the color theme you are using. Could you share which theme this is ? Thank you. Robbie
Thanks for this tutorial... Which editor are you using?
NetBeans
i downloaded net beans and teh "bshtml" that you have been used is not working its not generating any codes like your screen showing please help me to do that
Thank you so much for such an awesome tutorial, it helped me alot to clarify concepts and implement flawlessly... Thanks alot man!!
if i put sql code then it wont even open. only echo staements like are running. if i put mysqli statement anywhere then even index.php will not open nor it gives error. i dont know how to solve this. im using xampp
Thanks very much, your video helped me build an Simple CRM (added many more things the way you did). Can you tell how to replace text input with dropdown list and save it to the database and then display it from database like you to the form??
Thank a lot man for this amazingly easy to learn tutorial!
where can I get the bootstrap template that you talked about in the first minutes?
it just like drowning man catches at straw.. its really amazing video thanks sir!
I get this error when I click the Edit button - Warning: count(): Parameter must be an array or an object that implements Countable in process.php on line 42
im geting this error :( for the edit function .... count(): Parameter must be an array or an object that implements Countable
Me too
I already fixed it.
I change the count() function to mysqli_num_rows()
if(mysqli_num_rows($result)==1){
$row = $result->fetch_array();
$name = $row['name'];
$location = $row['location'];
}
@@krysteela thank uuu
@@krysteela Thank you so much!
i love your tutorials,... that was the best php lesson
In case your query doesn't successfully insert data into the table (10:56) yet doesn't display any errors.
This will fix it :
if(isset($_POST["save"])){
$name=strval($_POST["name"]);
/*This makes sure that what you are passing to the query is a String*/
//echo $name; /* Uncomment to make sure the POST method succeeded
$location=strval($_POST["location"]);
//echo $location;
$mysqli->query("INSERT INTO `data` (`name`, `location`)
VALUES ('$name', '$location')") /*Notice the single quotes ' ' */
or die(mysqli_error($mysqli)) ;
}
Great tutorial! May I know what Todo list application is that you are using here, the one with the check list. Thanks
OneNote
@@clevertechie Cool! Thanks mate. Very helpful tutorial!
when you push the button EDIT why it doesnt show the white screen? you dont have a header with location. so it must proceed to your script? it works like that for me so i dont get how to paste data into inputs. they are just empty
Awesome work mate, everything works perfect
*The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.* i got this at last
so atlast you are happy
Super useful tutorial. Learned a lot and got more motivated!