Designing a website in Php
Moderator: General Moderators
Designing a website in Php
Hi guys,
Last edited by singh on Fri Jan 23, 2004 11:01 am, edited 1 time in total.
SEA[RCH
Well..
you could use $_REQUEST['term']
for example you could use something like this
example;
if you have a html page you must add this between the <body> tags of that page.
Than to match the search term against just like title, author inside the html comments, change the $body_regex to:
If you dont want to search term to match text thats inside HTML or PHP tags in youre pages, add a call to , to the code
that load the contents of the file for searching.
Hope this will give you enough info on what to look for.. or atleast 1 solution on how to do it.
?>
you could use $_REQUEST['term']
for example you could use something like this
example;
if you have a html page you must add this between the <body> tags of that page.
Code: Select all
echo "
<body>
<!-- search-start -->
// youre html page
<!-- search-end-->
</body>";Code: Select all
$body_regex ='#<!--search-start -->(.*' . preg_quote($_REQUEST['term'], '#').'.*)<!--search-end -->#Sis';Code: Select all
strip_tags()that load the contents of the file for searching.
Hope this will give you enough info on what to look for.. or atleast 1 solution on how to do it.
?>
You're sort of wrong
I am not sure if you read my post carefully,
I am either looking for a website/tutorial that can help me
work on this assignment. Can you help me what that, because
you just splurt out code [which I don't get].
I am either looking for a website/tutorial that can help me
work on this assignment. Can you help me what that, because
you just splurt out code [which I don't get].
.
Well lets see, i am still strugling with php coding myself however...
for accessing a search on a database you could start with
http://www.mysql.com
since that is really what you are asking.
to have you update databases you could start reading up on
CREATING tables and INSERT INTO& UPDATE where for inserting new information into youre database and updating it. if you will install the mysql, inside youre mysql install dir you will find a manual.html.
Hope that something better to start on.
for accessing a search on a database you could start with
http://www.mysql.com
since that is really what you are asking.
to have you update databases you could start reading up on
CREATING tables and INSERT INTO& UPDATE where for inserting new information into youre database and updating it. if you will install the mysql, inside youre mysql install dir you will find a manual.html.
Hope that something better to start on.
The thing is: you posted your request in the PHP-Code section. So code flies around very fast in this section.
You could look around a few tutorial/script sites such as:
http://www.hotscripts.com/PHP/index.html
http://www.onlyphp.com/index.php
http://www.phpfreaks.com/
I started with hotscripts.
Dr Evil
You could look around a few tutorial/script sites such as:
http://www.hotscripts.com/PHP/index.html
http://www.onlyphp.com/index.php
http://www.phpfreaks.com/
I started with hotscripts.
Dr Evil