@@hazirahmusa2840 I don't know this As I don't copy the Code. I Just wanted to know the way to do this. And I did everything by myself. But I can help you?? What is your problem
@@creativeakshara8438 at first i was having error on undefined variable q then i tried some code to declare it then it says syntax error, unexpected end of file
Hey. This is my first time outside of html/css/js. This is seeming like I need something extra to do this. What exactly do I have to download (if anything) to make this work? Thanks.
If you need any personal help with your code, such as bug fixes or if your code isn't working as it should do, or perhaps if you would like a complete, professional website creating for you from scratch? Send me an email at joseph.dracup1997@gmail.com and I'd be more than happy to help out :).
Hi, i know this is pretty old video but i hate to watch these vids because of one reason. I have mysqli installed and i don't know if that makes much difference or a lot of difference in the code. Is the thing here only about in the $con attribute, that i change it to $con = mysqli_connect, or do i have to make more changes? Also, from now on, make videos also explaining this side of the code for those who have mysqli.
Very informative! keep up the good work pal! Now, how can one add a google-like paging system to the above s.engine! Perhaps you can create a similar video together with paging system added to it. Thanks.
Thanks again, Joe. Super tutorial. All I gotta do now is get a ton of text/.pdf docs into a database.... er.... I guess. Fingers crossed (which make it awkward to type :) John
Nice one ! :) I have only one question : how I can hide the password and/or the username of my database in the index.php to not be seen by those who click right on mouse, and can view my page source ? ;)
sure can just save as it and change the .html to .php suffix. but the php file (the one with .php) must be saved within htdocs folder which is the folder that you installed XAMPP or any phpmuadmin. i hope it help you .
Hi my pages don't seem to work. I have done the code same as yours. But when I open my index.html and run it on chrome. When i click on the other pages nothing happens. Am so frustrated. Any help would be appreciated.
Good morning Sir very good video Hindi me ek video create kijiye Jo ki 2 field ka search bnaeye first select city after second search keyword input field php7.2 me mysqli
All my text/entry fields do not work on my wordpress website. Eg. my search bar doesnt allow me to type anything. Also, my checkout billing information form wont allow text. Someone help!!!
Anshuman pattanayak Hi! If you need help with this I’m sure I can help you out! Please email me at: joseph.dracup1997@gmail.com for assistance. Thanks!
Hey Joe, i was having an issue with linking the search bar to my webpage. It would give me an error as well as my database taking in new usernames and passwords. It accepts the admin information just fine. I just emailed you as well and if anyone sees this and can help I'd appreciate it as well. Thank you.
Don't remember exactly what I did but I think I use: $s = $_GET['S'); $host ="localhost"; $dbname ="test": $dbusername= "root"; $dbpassword = ' '; $con= mysqli_connect($host, $dbusername, $dbpassword, $dbname); For the start then for the query: $query = mysqli_query($con, "SELECT * FROM books WHERE title LIKE '$s' "); $num_rows = mysqli_num_rows($query); Tell me if it works
Finally, I resolved this ! :) It's so simple that you would not think of it :D On the part when you have something like this one : if($_GET['q'] !== ''){ DEFINE ('DB_USER', 'your_user'); // here I prefer to define user, password, host, and database, to not get confuse during the code :D DEFINE ('DB_PSWD', 'your_password'); DEFINE ('DB_HOST', 'your_host_name'); DEFINE ('DB_NAME', 'your_database'); $dbcon = mysqli_connect(DB_HOST,DB_USER,DB_PSWD,DB_NAME) or die(mysql_error()); $query = mysqli_query($dbcon, "Select * FROM searchBar WHERE Titlu LIKE '%$search%' OR Descriere LIKE '%$search%'"); // As you can see, I use $search instead q, for every column from my table searcBar ;) $num_rows = mysqli_num_rows($query); // and so on ... } and before this add $search = $_GET['q']; One more think ... maybe two more thinks : 1. don't forget to check if you have method="GET" on your index page, and GET as well on your php page. 2. I added this code after the input field, to have a defined index util the php code ;)
you're right man I also did it that way because I'm also using mysqli however, the following part of the code, I only were able to make it run without the else statement: $q = $_GET['q']; if($_GET['q'] == 'Search...'){ header('Location: index.php'); } else { header('Location: Index.php'); } by any chance do you know how to make it work with the else statement?
Hi 👋, You can do the below tag in the section of your HTML. That should work; if it doesn't feel free to reach back and list what is wrong with the positioning of the image 🙂 Hope this helps 👍 ~ Evan
How do i search an alphanumeric text for example i want to search an invoice number IN83766 i want it to find that text and display the full row its connected to i only managed to find normal numbers for some reason and it displays its row , please can someone help me this is the line of code i use now $disp = mysql_query("SELECT First_Name, Surname, Email, InvoiceNumber FROM test WHERE InvoiceNumber= $invoice");
I only were able to make it run without the else statement: $q = $_GET['q']; if($_GET['q'] == 'Search...'){ header('Location: index.php'); } else { header('Location: Index.php'); } I'm using MySQLi, by any chance someone can tell me how to make it work with the else statement? thanks before hand
OMG! You have just saved my life with this... Being new to php yet I have a project to deliver soon... Thanks a lot
One of the finest channels on UA-cam
Thank you very much... appreciate the way you have explained the steps of php and database linking...
can you share the code? im having trouble Hazirah_musa104@gmail.com
Thanks for your help man...😊
Nice video..👍👍
Up to this stage, you helped me solve my problem with a search bar. Thank you
Hi, can you share the code? I really need it for search engine
I think that this mysql code is now outdated. Can you please teach how to make a professional search bar using the new code of mysql.🧐
Thanks 😊 It helped me a lot 😁
do you have problem on undefined variable 'q'?? can you help me?
@@hazirahmusa2840 I don't know this
As I don't copy the Code. I Just wanted to know the way to do this.
And I did everything by myself.
But I can help you??
What is your problem
@@creativeakshara8438 can I email you the code that im currently doing? Im kind of lost T_T
@@creativeakshara8438 at first i was having error on undefined variable q then i tried some code to declare it then it says syntax error, unexpected end of file
@@hazirahmusa2840 Please paste your code here
Thank you! This video has helped me a lot!
Hey. This is my first time outside of html/css/js. This is seeming like I need something extra to do this. What exactly do I have to download (if anything) to make this work? Thanks.
Having the same dilemma
XAMPP
XAMPP
FTP client and web hosting service
@@illestothvisualz9148 do i need xxamp also
Can u make an video on DBMS for search bar.
If you need any personal help with your code, such as bug fixes or if your code isn't working as it should do, or perhaps if you would like a complete, professional website creating for you from scratch? Send me an email at joseph.dracup1997@gmail.com and I'd be more than happy to help out :).
can you implemented search box with my desire query??
how do you get the local host plz help asap
Hey, can you tell me something about meta tagging?
Hi, i know this is pretty old video but i hate to watch these vids because of one reason. I have mysqli installed and i don't know if that makes much difference or a lot of difference in the code. Is the thing here only about in the $con attribute, that i change it to $con = mysqli_connect, or do i have to make more changes? Also, from now on, make videos also explaining this side of the code for those who have mysqli.
Can i get source code???
Just asking...................... ;)
can you share the code? im having trouble Hazirah_musa104@gmail.com
@@hazirahmusa2840
Hi 👋,
No.
Let me know what error the console returns, and I'll help. 🙂
Let's "teach you fishing; not giving you fish." 👍
~ Evan
That's really cool. I found that really helpful.
superb!!! awsome !!! no words
Very informative! keep up the good work pal! Now, how can one add a google-like paging system to the above s.engine! Perhaps you can create a similar video together with paging system added to it. Thanks.
can you share the code? im having trouble Hazirah_musa104@gmail.com
great video mate!! quick question where to learn php.. any online source or books? make more!!!
youtube tutorials ?
yes
I am missing something in between. Are you still opening the original index.html file to view the search results?
Thanks again, Joe. Super tutorial. All I gotta do now is get a ton of text/.pdf docs into a database.... er.... I guess. Fingers crossed (which make it awkward to type :)
John
Hi can you share the code? I really really need it T_T
Thankyou for your tutorial.. But Its giving me undefined q. How to resolve that?
Thank you so much for this tutorial. It was very helpful!
can you share the code? im having trouble Hazirah_musa104@gmail.com
can u teach us ow to publish it to the web
one of the best videos though i had to modify some stuff and am also using MYSQLI
can you share the code? im having problem T_T
it can be a big help for me T_T because im having error on undefined variable 'q'
@@hazirahmusa2840
Hi,
there is an answer two comments above this one.
you dont show all tutorial totally as well as possible xo try u're best thank u!!!!!!!!!!!!!1
How do you get the php tables?
Undefined variable: q. how can I fix it?
SOLUTION:
.
.
.
@@nikolamitrevski1535 Wow cool tis resolved my issues. But could elaborate as to why I was getting the error? Thanks in advance
@nikola 4th and 5th line is really confusing.... Can you be more specific... Please
Hi there, do you have the source code you created during this video to share?
Hi 👋,
No.
Let me know what error the console returns, and I'll help. 🙂
Let's "teach you fishing; not giving you fish." 👍
~ Evan
I have all the code correct I'm sure however I don't get any results when I press search
Where di you go over the q variable? Mine doesnt understand the 'q'. Sure its a name but it doesnt understand.
Nice one ! :)
I have only one question : how I can hide the password and/or the username of my database in the index.php to not be seen by those who click right on mouse, and can view my page source ? ;)
Cristian Florescu Ask google...
Use post method
I don't believe you can view PHP in "View Page Source"
you are right evan. I was more dumbt back then. :D
can you link the code in the description so people can just copy it
Hi, how could you change your code so that it would look for the word(s) you input on your website and show you on which page it is?
You got the basics, now use the knowledge of PHP to expand on that! 🙂
I want my search bar to appear on my index.html page. Can I change it to a php file?
sure can just save as it and change the .html to .php suffix.
but the php file (the one with .php) must be saved within htdocs folder which is the folder that you installed XAMPP or any phpmuadmin.
i hope it help you .
ok thank you
Hi my pages don't seem to work. I have done the code same as yours. But when I open my index.html and run it on chrome. When i click on the other pages nothing happens. Am so frustrated. Any help would be appreciated.
🙌🙌
how to write for the keyword search? for ex: when we write any word on search-bar regardless case sensitive word should popup from content of body tag
please answer my qwestion
where did the q varaiable come in
nice
perfect
where i can download???..give the link please
i got error T_T can you make another one with current version??
Can we do this only in HTML file without PHP files
No.
You can still put HTML code in PHP so long as you follow the PHP formatting
Good morning Sir very good video Hindi me ek video create kijiye Jo ki 2 field ka search bnaeye first select city after second search keyword input field php7.2 me mysqli
how do I get the database thing in the beginning
All my text/entry fields do not work on my wordpress website. Eg. my search bar doesnt allow me to type anything. Also, my checkout billing information form wont allow text. Someone help!!!
I'm getting the error are
Unexpected'if(T_IF)
Please tell me solutions above the error
How did you make the six record for the database? 2:10
nvm, i got it
what do you do then plz
pls say how to set up the database
Hello, The javascript on search bar does not work.
Notice: Undefined index: q in C:\xampp\htdocs\pratice\search\index.php on line 2
Anshuman pattanayak Hi! If you need help with this I’m sure I can help you out! Please email me at: joseph.dracup1997@gmail.com for assistance. Thanks!
Same here...
🚀🚀
Does anyone know how to center the search bar? Thanks in advance
Riyan Ahmed
The search bar contents go here
@@alphagamerhd3148
I would personally use CSS to center it, but that should work too.
Hey Joe, i was having an issue with linking the search bar to my webpage. It would give me an error as well as my database taking in new usernames and passwords. It accepts the admin information just fine. I just emailed you as well and if anyone sees this and can help I'd appreciate it as well. Thank you.
where do i get this code
thanks you @ jeo dracup ...i was searching the exact thing..
plz mail me the code.
can you share the code? im having trouble Hazirah_musa104@gmail.com
🌟🌟🌟
The DB connection wasn't working for me but i fixed it. For the search box why don't you put required in it ?
Hi can you share the code? Im having trouble and examination coming very sooon 😭
Don't remember exactly what I did but I think I use:
$s = $_GET['S');
$host ="localhost";
$dbname ="test":
$dbusername= "root";
$dbpassword = ' ';
$con= mysqli_connect($host, $dbusername, $dbpassword, $dbname);
For the start then for the query:
$query = mysqli_query($con, "SELECT * FROM books WHERE title LIKE '$s' ");
$num_rows = mysqli_num_rows($query);
Tell me if it works
@@kiszatay6149 i already done that.. but it says undefine vaeiable q..
@@hazirahmusa2840 what are you using 'q' for ?
@@kiszatay6149 let me send the code..
@Creative Akshara
body {
font-family: arial;
}
h3 {
margin: 20px 0px 0px 0px;
padding: 0;
}
h4 {
margin: 10px 0px 0px 0px;
padding: 0;
}
p {
margin: 5;
padding: 0;
}
a {
color: #000000;
text-decoration: none;
}
a:hover {
color: #000000;
text-decoration: none;
}
Search
function active() {
var search = document.getElementById('searchBar');
if(searchBar.value == 'Search...'){
searchBar.value = ''
searchBar.placeholder = 'Search...'
}
}
function inactive() {
var search = document.getElementById('searchBar');
if(searchBar.value == ''){
searchBar.value = 'Search...'
searchBar.placeholder = ''
}
}
Man the mismatch between the mouse pointer and the selection run me crazy
yeah bahaha!
Holy shit guys I got it. The fix for the undefined q is
$search = (isset($_GET['q']) ? $_GET['q'] : null);
I'm getting the following error message - Notice: Undefined index: q in C:\xampp\htdocs\lexicon\search_bar
av.php on line 2
Any ideas?
same i got the same error... I already use mysqli. can u help us Joe. thanks
have anyone solved problem with undefined index: q?
Finally, I resolved this ! :) It's so simple that you would not think of it :D
On the part when you have something like this one :
if($_GET['q'] !== ''){
DEFINE ('DB_USER', 'your_user'); // here I prefer to define user, password, host, and database, to not get confuse during the code :D
DEFINE ('DB_PSWD', 'your_password');
DEFINE ('DB_HOST', 'your_host_name');
DEFINE ('DB_NAME', 'your_database');
$dbcon = mysqli_connect(DB_HOST,DB_USER,DB_PSWD,DB_NAME) or die(mysql_error());
$query = mysqli_query($dbcon, "Select * FROM searchBar WHERE Titlu LIKE '%$search%' OR Descriere LIKE '%$search%'"); // As you can see, I use $search instead q, for every column from my table searcBar ;)
$num_rows = mysqli_num_rows($query);
// and so on ...
}
and before this add
$search = $_GET['q'];
One more think ... maybe two more thinks :
1. don't forget to check if you have method="GET" on your index page, and GET as well on your php page.
2. I added this code after the input field, to have a defined index util the php code ;)
I'm new to PHP and I spent so long trying to fix this. Didn't know it was so simple. Thanks a lot!
you're right man I also did it that way because I'm also using mysqli however, the following part of the code, I only were able to make it run without the else statement:
$q = $_GET['q'];
if($_GET['q'] == 'Search...'){
header('Location: index.php');
} else {
header('Location: Index.php');
}
by any chance do you know how to make it work with the else statement?
how do you add a logo in the top corner i need help with that.
Hi 👋,
You can do the below tag in the section of your HTML.
That should work; if it doesn't feel free to reach back and list what is wrong with the positioning of the image 🙂
Hope this helps 👍
~ Evan
@@evan.5967 3 years later, thanks. I've been waiting this whole time.
how we can set php in local server please help
do you need any javascript code for this if so could you send copy. if not would you be willing to make our site search work for payment obviously.
Hi Mark, email me at joseph.dracup1997@gmail.com. I'd be happy to make sure your website works 100% for payment :).
Plz send the link of your code
RIP Brother
How do I create my own database? I'm confused how you start off the video with one already.
Hi 👋,
You can make a database with PHP. 👍
You can use XAMPP to build a database.🙂
~ Evan
give me this save file
How do i search an alphanumeric text
for example i want to search an invoice number
IN83766
i want it to find that text
and display the full row its connected to
i only managed to find normal numbers for some reason and it displays its row , please can someone help me
this is the line of code i use now
$disp = mysql_query("SELECT First_Name, Surname, Email, InvoiceNumber FROM test WHERE InvoiceNumber= $invoice");
How do insert records into the database?(2:12)
Mach vlogs
How ti write the localhost code? :(
button "GO"??
you never defined $q in this how is this working??
im having this problem also!! do u solve it already?
can any one give the total source file on my dropbox id or gmail?
undefined function mysql_connect() HELP
try this
$con=$link=mysqli_connect("localhost", "root", "")
$db=mysqli_select_db($link,"databasename")
@@lingard533 do you have problem with undefined variable 'q'?
Hey everyone just wanted to say in the line
it is actually-
that is why no results come
i got error: Undefined variable: q on line 79
So did I. Did you end up finding out how to fix it? Let me know if you did :p
Me to :(
Did you guys fixed the errors? 😔
I only were able to make it run without the else statement:
$q = $_GET['q'];
if($_GET['q'] == 'Search...'){
header('Location: index.php');
} else {
header('Location: Index.php');
}
I'm using MySQLi, by any chance someone can tell me how to make it work with the else statement?
thanks before hand
can you share the code please? im having trouble
This is so confusing! What do I do if I don't use localhost
Evan Brealey use yor domain...?
Please provide source code.... please.. please.. please..!!!!
PLEASE TELL ME HOW TO GET MYSQL AND PHPMYADMIN BECAUSE ITS VERY HARD
Okay, i know its been more then ten months, but i have the video discription to geting mysql,
ua-cam.com/video/kVc_9vAO7oI/v-deo.html
Shroom2018 Before you get MySQL, learn HTML, CSS and Javascript
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in how to solve this error please help thanks in advance
it is mysqli
This is The Fake Video
OMG! No! Everyone STOP WATCHING THIS! Go learn something modern like mysqli or pdo. mysql_ functions are dead forever.
It doesn't work there are 1 million errors