Submit form content via url

I have a form

<form action=“http://www.smarturl.uni.cc/index.php” method=“post” target="_blank">
<table align=“center” cellpadding=“5” bgcolor="#E7E7F7">
<tr>
<td>
<b><font face=“Verdana”><font size=“2”>Enter a long URL to make </font>
<a href=“www.smarturl.uni.cc”><font size=“2”>Smart URL</font></a></font>:</b><br />
<input type=“text” name=“longurl” size=“30”><input type=“submit” name=“submit” value=“Make Smart URL!”>
</td>
</tr>
</table>
</form>

i want to send this form contents from url like that

[COLOR=“Red”]http://www.smarturl.uni.cc/index.php?longurl=http://en.wikipedia.org/wiki/Indo-Pakistani_War_of_1965&action=submit[/COLOR]

But it cant work for me.plz help

You need to add some code that checks if the submit action exists when the page loads. If it does then do what you want your form to do.

in php you can do this with:
if ($_GET[‘action’] == ‘submit’) { }

If you’re submitting through the URL you’ll also want to change method=“post” into **method=“get” **.

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

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>';
}
?>


I can’t figure it out…

Isn’t this what you want?
Load it onto your test web server and see the outcome.

Thanks all of you to help me…i have done it

http://www.smarturl.uni.cc/add.php?longurl=http://en.wikipedia.org/wiki/Pakistan