Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 5:13 PM   #1
Eric Dillard
 
Eric Dillard's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Problem with form data not being posted to another page

Hello Everyone

I have a problem with my apache and php scripts. The form data is not being
passed to the page it is submit to. I' ve tried the pages out on another
machine and work with no problems. Any idea's what could be problem. I
reinstalled both apache and php, but with luck.

Thanks Eric


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 07-01-2007, 5:13 PM   #2
Eric Dillard
 
Eric Dillard's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Problem with form data not being posted to another page


web address for the server is 64.132.106.81/testpage/test3.php


This is the source test3.php and test4.php
<html>
<head>
<title>Listing 1-4</title>
</head>
<body>
<!--<form action="test4.php" method="post"> -->
<form action="test4.php" method="post">

Your Name:
<INPUT TYPE="text" name="YourName">
<INPUT TYPE="submit" NAME="x" VALUE="COMPUTE">
<form>
</body>

</html>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Dixie global menu</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<LINK href="css/dixie.css" rel=stylesheet>
</HEAD>
<BODY text=#000000 vLink=#000099 aLink=#0000ff link=#000099 bgColor=#999999
leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<?php
echo "<p>Welcome: $YourName <br>";
?>
</BODY>
</HTML>

Thanks for the help
Eric Dillard
RHCT


"Andy Hassall" <andy@andyh.co.uk> wrote in message
news:9935kvg4r7ab485tne404m6pnrfov6bm0v@4ax.com...
> On Tue, 19 Aug 2003 16:35:52 -0400, "Eric Dillard" <eric@seisystems.com>

wrote:
>
> >I have a problem with my apache and php scripts. The form data is not

being
> >passed to the page it is submit to. I' ve tried the pages out on another
> >machine and work with no problems. Any idea's what could be problem. I
> >reinstalled both apache and php, but with luck.

>
> Post a minimal, runnable piece of code that demonstrates your problem.
>
> Without being able to see your system, any advice is just a guess as you
> haven't given enough information (although there's one guess that's more

likely
> than others:
>

http://www.andyh.uklinux.net/faq/com...rnal-variables)
>
> --
> Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
> Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:13 PM   #3
laurie
 
laurie's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Problem with form data not being posted to another page

try:

<?php
$YourName = $HTTP_POST_VARS['YourName'];
echo "<p>Welcome: $YourName <br>";
?>

do the same for all variables you pass over.
You probably have register_globals switched off in php.ini (which is for the best).
When submitting a form, the values are put into an array (HTTP_POST_VARS or HTTP_GET_VARS depending whether you have action=post
or action=get in the form).
You then access the values in the array as above. They will be stored with the name you set for the text field, i.e. <INPUT
TYPE="text" name="YourName">.


"Eric Dillard" <eric@seisystems.com> wrote in message news:3f4298e3$0$43849$39cecf19@news.twtelecom.net. ..

web address for the server is 64.132.106.81/testpage/test3.php


This is the source test3.php and test4.php
<html>
<head>
<title>Listing 1-4</title>
</head>
<body>
<!--<form action="test4.php" method="post"> -->
<form action="test4.php" method="post">

Your Name:
<INPUT TYPE="text" name="YourName">
<INPUT TYPE="submit" NAME="x" VALUE="COMPUTE">
<form>
</body>

</html>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Dixie global menu</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<LINK href="css/dixie.css" rel=stylesheet>
</HEAD>
<BODY text=#000000 vLink=#000099 aLink=#0000ff link=#000099 bgColor=#999999
leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<?php
echo "<p>Welcome: $YourName <br>";
?>
</BODY>
</HTML>

Thanks for the help
Eric Dillard
RHCT


"Andy Hassall" <andy@andyh.co.uk> wrote in message
news:9935kvg4r7ab485tne404m6pnrfov6bm0v@4ax.com...
> On Tue, 19 Aug 2003 16:35:52 -0400, "Eric Dillard" <eric@seisystems.com>

wrote:
>
> >I have a problem with my apache and php scripts. The form data is not

being
> >passed to the page it is submit to. I' ve tried the pages out on another
> >machine and work with no problems. Any idea's what could be problem. I
> >reinstalled both apache and php, but with luck.

>
> Post a minimal, runnable piece of code that demonstrates your problem.
>
> Without being able to see your system, any advice is just a guess as you
> haven't given enough information (although there's one guess that's more

likely
> than others:
>

http://www.andyh.uklinux.net/faq/com...rnal-variables)
>
> --
> Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
> Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)




 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:14 PM   #4
Eric
 
Eric's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Problem with form data not being posted to another page

Thanks for the help.

Eric Dillard


"Andy Hassall" <andy@andyh.co.uk> wrote in message
news:2b95kvs7f21bvp005pgu98g2r9a4duqdo0@4ax.com...
> On Tue, 19 Aug 2003 17:38:24 -0400, "Eric Dillard" <eric@seisystems.com>

wrote:
>
> >web address for the server is 64.132.106.81/testpage/test3.php

>
> Submitting the form goes to a phpinfo() output, clearly showing:
>
> register_globals
> Off Off
>
> (Which is as it should be)
>
> >This is the source test3.php and test4.php

> [snip]
> ><?php
> > echo "<p>Welcome: $YourName <br>";
> >?>

>
> See the URL listed in my previous message. You should use

$_POST['YourName'],
> not $YourName.
>
> Contents reproduced here for the sake of archives:
>
> External variables (forms, sessions and cookies)
> I've just upgraded to PHP 4.2.0 or later, and I'm getting 'undefined

variable'
> warnings on all my pages. Why?
>
> You are relying on the register_globals configuration setting being on. It

is
> off by default in PHP 4.2.0 and later.
>
> Code of the following form will no longer work in the default

configuration:
>
> <form method="GET">
> <input type="text" name="input1" />
> <input type="submit" />
> </form>
>
> <?php
> if (isset($input1)) {
> echo $input1;
> }
> ?>
>
> The variable $input1 will be undefined - global variables for each form

input
> element are no longer created by default for security reasons. This is
> documented in the following pages:
>
> PHP 4.1.0 Release Announcement
> http://www.php.net/release_4_1_0.php
>
> PHP 4.2.0 Release Announcement
> http://www.php.net/release_4_2_0.php
>
> PHP Manual - External Variables
> http://www.php.net/manual/en/languag...s.external.php
>
> Secure Programming In PHP article on zend.com
> http://www.zend.com/zend/art/art-oertli.php
>
> The new mechanism using the superglobal variables $_GET, $_POST, $_SERVER,
> $_SESSION, $_ENV and $_REQUEST is much preferred over the old global

variable
> method.
>
> <form method="GET">
> <input type="text" name="input1" />
> <input type="submit" />
> </form>
>
> <?php
> if (isset($_GET['input1'])) {
> echo $_GET['input1'];
> }
> ?>
>
> If you absolutely must use the old method, and you are aware of the

security
> risks this involves, you can restore the old behaviour with the
> register_globals configuration option in php.ini.
>
>
> --
> Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
> Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: , , , , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
error on POSTed form Wm PHP 0 07-01-2007 5:10 PM
form data will not post Nomen Nescio PHP 5 07-01-2007 5:06 PM
Catching form posted variable?? Fishter PHP 1 07-01-2007 4:17 PM
sending form data as email using SMTP server ??? James PHP 3 07-01-2007 3:32 PM
Dumping Form data to file Charles E. Pelkey PHP 3 07-01-2007 3:15 PM


Featured Websites




All times are GMT +1. The time now is 12:26 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98