• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: How to create form to retreive/search information

How to create form to retreive/search information 17 years 2 months ago #1791

hi,

please advice me on this. How to create a form to search information from datebase front end. I have created a metrimonial submit form now i need to create a form which can search information from database. please help me. I am waiting for you reply
The administrator has disabled public write access.

Re:How to create form to retreive/search information 17 years 2 months ago #1818

  • alex
  • alex's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 443
  • Thank you received: 3
Hello,

i think you are changing the scope of RSform! here because each time a submit button is clicked, RSform!'s main interest is to e-mail data/store it in the db. So each time someone will search for something, RSform! will store the keyword in it's db. It's rather difficult creating a search script that would display also the results. I'm not saying it can't be done. All you have to do is to create a script and place it in Scripts called on form process.

It should look something like this:
global $database;
if(isset($_POST['form']['searchterm'])){
$database->setQuery(\"SELECT * FROM #__content WHERE introtext LIKE '%{$_POST['form']['searchterm']}%' OR fulltext LIKE '%{$_POST['form']['searchterm']}%'\"«»);
$results = $database->loadObjectList();
 
if(!empty($results)){
	foreach($results as $result){
		echo '<p>'.$result->introtext.'</p>';
	}
}
}
The administrator has disabled public write access.

Re:How to create form to retreive/search information 17 years 2 months ago #1946

thank you for you reply :) but its not working. I tried with this code i found its not working can you help me clearly please help me as soon as possible i wil be waiting.:(
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!