Reputation: 33
I've tried other solutions posted here, but nothing worked..
I have the following code on .htaccess doc.
RewriteEngine On
RewriteRule ^registrationForm/([a-zA-Z0-9_-]+)$ registrationForm.php?code=$1
RewriteRule ^registrationForm/([a-zA-Z0-9_-]+)/$ registrationForm.php?code=$1
I receive an email and by clicking on the url I get access to registrationForm.php
I start registrationForm.php like that:
<?php
if (!empty($_GET['code']) && isset($_GET['code']))
{
$code=$_GET['code'];
Do someone knows why this works on localhost but not on remote server?
Upvotes: 3
Views: 866
Reputation: 101
The problem is not how you got the code running in acquiring the code. The problem could have occurred here.
if (!empty($_GET['code']) && isset($_GET['code']))
{
$code=$_GET['code'];
The line of code above was not able to get the code
part which is part of your querystring. The querystring that has been generated doesn't have the word code
in it. You may want to read this article.
Upvotes: 1