You are here: Passing a HTML variable to a PHP file using include « PHP Programming Language « IT news, forums, messages
Passing a HTML variable to a PHP file using include

Posted by Dave Kelly on 12/16/29 11:58

From a html page menu I need to pass 2 variables.

<a
href="signup.php?var1=list-PINSS.php&var2=blurb-PINSS.php"><h3>Padre
Island National Sea Shore</h3></a><br>

These go to a php web page and are used thusly.

<?php include ($_SERVER["var2"]); ?> //this is line 3
<?php include ($_SERVER["var1"]); ?> // line 5

I am getting these error:


Notice: Undefined index: var2 in
/var/www/vhosts/texasflyfishers.org/httpdocs/signup.php on line 3

Warning: main(): Failed opening '' for inclusion
(include_path='.:/usr/share/pear') in
/var/www/vhosts/texasflyfishers.org/httpdocs/signup.php on line 3


Notice: Undefined index: var1 in
/var/www/vhosts/texasflyfishers.org/httpdocs/signup.php on line 5

Warning: main(): Failed opening '' for inclusion
(include_path='.:/usr/share/pear') in
/var/www/vhosts/texasflyfishers.org/httpdocs/signup.php on line 5

What am I doing wrong?

TIA
Dave

 

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

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