View Single Post
(#4 (permalink))
Old
bigal's Avatar
bigal bigal is offline
Senior Member
bigal is on a distinguished road
 
Posts: 196
Join Date: Mar 2009
Location: Brisbane, Australia
Default 11-30-2009, 11:27 AM

You want to fetch the longurl form value in the link?
http://www.smarturl.uni.cc/index.php?longurl=$longurl

how about this way?

Displays the form, request for value and submit,
if longurl value submited, header to
http://www.smarturl.uni.cc/index.php?longurl=$longurl

PHP Code:
<?php

if (isset($_POST['longurl'])){
  
$longurl $_POST['longurl'];
  
header("location: http://www.smarturl.uni.cc/index.php?longurl=$longurl");
}else{

  echo 
'
  <form action="'
.$_SERVER['PHP_SELF'].'" method="post" target="_blank">
  <table><tr><td>
  Enter a long URL to make
  <a href="www.smarturl.uni.cc"> Smart URL:<br />
  <input type="text" name="longurl" size="30">
  <input type="submit" name="submit" value="Make Smart URL!">
  </td></tr></table>
  </form>'
;
}
?>


Best Regards/Allen Chen
Joomla, phpbb, WordPress, Opencart Installs
Reply With Quote