• 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: Redirecting / calling a URL from RSForm Script

Redirecting / calling a URL from RSForm Script 13 years 2 months ago #12893

Hello Everyone,

I've created a form with RSForm Pro to authenticate a user. After a user submits his username and password, this is compared with the saved user credentials in the database. If the authentication is successful, i want the user to be redirected to a new template (URL) as below.

// Retrieve form variables
$username = $_POST;
$password = $_POST;


// create reference to global database
$db =& JFactory::getDBO();

// create query
$query = "select * from jos_support_center";


// execute query
$db->setQuery($query);

// return results
$usernames = $db->loadObjectList();



// if the container variable is not empty, loop through it
if(count($usernames)){

foreach($usernames as $user){


if($username == $user->username && $password == $user->password){

header('http://127.0.0.1/index.php?option=com_content&view=article&id=20&Itemid=43') ;

also tried fopen() command but was unsuccessful

$fd = fopen('http://127.0.0.1/index.php?....','r');
}



}

}else{

// Thank you message
$thankYouMessage = "The username and password combination you've provided is not correct. Please do try again later ";

echo "<p>".$thankYouMessage."</p>";

}


I still can't figure out what i'm missing here. I'd be very grateful if someone can correct me. Thanks
The administrator has disabled public write access.

Re:Redirecting / calling a URL from RSForm Script 13 years 1 month ago #12904

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Hello,

please try adding a die(); or exit(); statement after the redirect.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
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!