Results 1 to 8 of 8

Thread: Set more variables to URL

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Private First Class Earliboy's Avatar
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    130
    Thanks
    5
    Thanked 88 Times in 61 Posts
    Well okay, i made some changes and the problem is may the overgiving of the URL.
    Yes, i messed the code a littlebit up but i get my outputs that tells me that everything should be allright.
    Code:
    	$newURL = $_SERVER["REQUEST_URI"];
    	echo $newURL;
    	
    	$_GET['limit_rows'] = 500;
    Sets the actualy URL and output it, also sets the limit rows to 500 (to test)
    Output:
    Code:
    /echelon/clientdetails.php?id=2
    next parts:
    Code:
    	$newURL .= "&limit_rows=".$_GET['limit_rows'];
    	
    	echo $newURL;
    	echo "<br>";
    	
    	if(isset($_GET['limit_rows']))
    	{
    		$newURL .= "&limit_rows=".$_GET['limit_rows'];
    
    		echo isset($newURL) ? htmlspecialchars($newURL) : '';
    	}
    Outputs:
    Code:
    /echelon/clientdetails.php?id=2&limit_rows=500
    /echelon/clientdetails.php?id=2&limit_rows=500&limit_rows=500
    Even the second line works fine if i set it manually to the url.

    Actually Form:
    Code:
    	<center>
    		<h5>Enter number of lines you want to see.</h5>
    		<!--<form action="<?//=$_SERVER["REQUEST_URI"]?>" method="get">-->
    		<form action="<?php $newURL ?>" method="get">
    			<input type="text" name="limit_rows" value="<?php echo $limit_rows?>" onblur="if(this.value == ''){ this.value = '<?php echo $limit_rows?>'; }" onfocus="if(this.value == '<?php echo $limit_rows?>'){ this.value = '';}" />
    				<br/>
    			<input type="submit" value="Refresh" />
    		</form>
    	</center>
    	<br>
    So the URL is fine, the overgive of the URL should be fine, the old one should output the same. Idk whats wrong at here, i still get redirected to clients.php if i click on the refresh button.

    Any ideas?

    And btw, I'm working now 3 hours on this error ^^
    Last edited by Earliboy; 30th January 2013 at 02:37.
    No ... No ... this is not possible .......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •