Website News Blog

Registration fail, is this fixable? – PHP – SitePoint Forums – Notice Global Web

I hit a entrance form,

when I utter the run button, I intend a popup modify (pictured) and the address becomes

after registering, the address ease has the #register on the end.
Dont I requirement to vanish it?
heres the logic

   if(empty($errors))
   {
   	$_SESSION['success_message'] = 'Your entrance aggregation has been saved. Check your telecommunicate to rank the entrance process.';
   	//die(header("Refresh:0"));	
   	//die(header('Location:'.BASE_URL));	
   	//$url = explode("#",$_SERVER['REQUEST_URI']);	
   	//header('Location:'.$url[0]);

   	
   }

the commented discover lines didn’t work

Why is your cipher swing the #register on the modify of the address at all?

If you are at the saucer of desegregation generalized determine registration/login cipher on a scheme page, the address for that tender determines what noesis should be displayed. A popup for an state aforementioned registering or logging-in is not the noesis of the tender and shouldn’t modify the URL.

The think for redirecting to the literal aforementioned address of the underway tender upon flourishing termination of place method modify processing cipher is to preclude the application from resubmitting the modify accumulation if that address gets browsed backwards to or reloaded. If you modify the url in some artefact when you action this redirect, someone crapper achievement up to a computer, unstoppered the application and enter/navigate to the address of the modify tender and ingest the browser’s developer tools, meshwork tab, to wager what the modify accumulation is.

I haw hit screwed up then, heres the unification to unstoppered up the registation modify popup

<a class="btn btn-outline-light btn-sm" href="#register">Register</a>

which adds the #register to the URL, then this is visable

<div id="register" class="overlay">
	<div class="popup">
		<div class="content">
		  <a class="close" href="">&times;</a>
			<div class="alert alert-primary mb-0" role="alert">
		      <h3><i class="fa fa-registered"></i>&nbsp;&nbsp;Register</h3>
			  <hr>
				<div class="alert alert-light abut border-light shadow-sm" role="alert">
				  <form method="POST">
...
				  <input type="hidden" name="type" value="register">
				  </form>
				</div>
			</div>
		</div>
	</div>
</div>

Then when I accede it, the address ease has the dopy #. Am I doing it wrong?

or should I ingest javascript to unstoppered a popup

or like

<a href="https://www.sitepoint.com/community/t/registration-fail-is-this-fixable/registration.php" onclick="openRegistration()">Register</a> 

in housing javascrpt is disabled.

What is the library/code that actually causes the popup to be displayed?

Source unification

Registration fail, is this fixable? – PHP – SitePoint Forums #Registration #fail #fixable #PHP #SitePoint #Forums

Source unification Google News



Source Link: https://www.sitepoint.com/community/t/registration-fail-is-this-fixable/451468

Leave a Reply

Your email address will not be published. Required fields are marked *