You are here: Re: connect to same page $_POST in <a> tag « PHP SQL « IT news, forums, messages
Re: connect to same page $_POST in <a> tag

Posted by Douglas F. on 10/09/05 20:10

"Tyrone Slothrop" <ts@paranoids.com> wrote in message
news:c0mgk1dggfvitmd7v7tl56395b0lk7e86t@4ax.com...
> On Sat, 8 Oct 2005 14:22:21 -0400, "Douglas F." <whisper@yahoo.com>
> wrote:
>
> >
> >"Tyrone Slothrop" <ts@paranoids.com> wrote in message
> >news:37lek1hsijgdr01tgh8k3cca23u4acuov8@4ax.com...
> >> On Sat, 8 Oct 2005 00:20:43 -0400, "Douglas F." <whisper@yahoo.com>
> >> wrote:
> >>
> >> >I would like to connect to:
> >> ><?php
> >> >if(isset(_POST['ver']) {
> >> > require_once('./MyStuff/mysql_connect.php');
> >> > $query2 = "INSERT INTO versiondl(Version, Date)
> >> > VALUES('$ver', NOW())";
> >> >}
> >> >?>
> >> >
> >> ><td ... <a href= "./Download Files/somefile.exe"> somefile </a><td>
> >> >
> >> >How can I use something like in a form (action="<?php echo
> >> >$_SERVER['PHP_SELF']; ?>") to connect from the html <a> tag to the
above
> >php
> >> >block?
> >> >
> >>
> >> Why not do it as a GET instead? Or do a bit of JavaScript:
> >> <a href="whatever" onClick="document.form.submit();"
> >
> >How does the name: 'ver' get input so that _POST[ver] will pick it up?
>
> Pass as a query string:
> <a href="<?$_SERVER['PHP_SELF']?>?ver=somehting">">
> Then evaluate: $_GET['ver']
>
Could it be written:

<a href="./Download Files/somefile.exe">somefile>
"<?$_SERVER['PHP_SELF']?>?ver= somefile"> </a>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация