473,909 Members | 4,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Undefined index

i have two file with jobapp.html calling jobapp_action.p hp
<HTML>
<!-- jobapp.html -->
<BODY>
<H1>Phop's Bicycles Job Application</H1>
<P>Are you looking for an exciting career in the world of cyclery?
Look no further!
</P>
<FORM NAME='frmJobApp ' METHOD=post ACTION="jobapp_ action.php">
Please enter your name:
<INPUT NAME="applicant " TYPE="text"><BR >
<INPUT NAME="enter" TYPE="submit" VALUE="Enter">
</FORM>
</BODY>
</HTML>
<HTML>
<!-- jobapp_action.p hp -->
<BODY>
<P>Welcome <?php echo ($_GET[applicant]); ?>!</P>
</BODY>
</HTML>

but it return

Welcome
Notice: Undefined index: applicant in c:\inetpub\wwwr oot\jobapp_acti on.php on line 4
!
Jul 16 '05 #1
2 106636
You're using the 'post' method to post to frmJobApp, so you need to use
$_POST[applicant] rather than $_GET (or use method="get" rather than
method="post").

MK.

sky2070 wrote:
i have two file with jobapp.html calling jobapp_action.p hp
<HTML>
<!-- jobapp.html -->
<BODY>
<H1>Phop's Bicycles Job Application</H1>
<P>Are you looking for an exciting career in the world of cyclery?
Look no further!
</P>
<FORM NAME='frmJobApp ' METHOD=post ACTION="jobapp_ action.php">
Please enter your name:
<INPUT NAME="applicant " TYPE="text"><BR >
<INPUT NAME="enter" TYPE="submit" VALUE="Enter">
</FORM>
</BODY>
</HTML>
<HTML>
<!-- jobapp_action.p hp -->
<BODY>
<P>Welcome <?php echo ($_GET[applicant]); ?>!</P>
</BODY>
</HTML>

but it return

Welcome
Notice: Undefined index: applicant in c:\inetpub\wwwr oot\jobapp_acti on.php on line 4
!


--
MeerKat

Jul 16 '05 #2
sk***********@h otmail.com (sky2070) schrieb:
[File 1]
<FORM NAME='frmJobApp ' METHOD=post ACTION="jobapp_ action.php">
Please enter your name:
<INPUT NAME="applicant " TYPE="text"><BR >
<INPUT NAME="enter" TYPE="submit" VALUE="Enter">
</FORM>
[File 2]
<P>Welcome <?php echo ($_GET[applicant]); ?>!</P>

Welcome Notice: Undefined index: applicant in c:\inetpub\wwwr oot\jobapp_acti on.php on line 4 !


You're using POST, not GET. So the data should be in $_POST["applicant"]
(and not in $_GET["applicant"] or $_POST[applicant]).

Matthias
Jul 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
108858
by: lawrence | last post by:
I just switched error_reporting to ALL so I could debug my site. I got a huge page full of errors. One of the most common was that in my arrays I'm using undefined offsets and indexes. These still work fine, but with error reporting at all they are marked as errors. Why? What am I doing wrong? www.monkeyclaus.org
5
10921
by: news.bigpond.com | last post by:
getting errors Notice: Undefined index: name in F:\uni\Software engineering\assignment4\guestbook.php on line 6 the variable $name is declared as $name = _POST; What could be causing this? I've recently installed php 5 on IIS with mysql 4. All running on windows XP
4
7198
by: John Oliver | last post by:
PHP Notice: Undefined index: name in /home/www/reformcagunlaws.com/new.php on line 6 PHP Notice: Undefined index: address in /home/www/reformcagunlaws.com/new.php on line 7 PHP Notice: Undefined index: city in /home/www/reformcagunlaws.com/new.php on line 8 PHP Notice: Undefined index: county in /home/www/reformcagunlaws.com/new.php on line 9 PHP Notice: Undefined index: zip in /home/www/reformcagunlaws.com/new.php on line...
3
4973
cassbiz
by: cassbiz | last post by:
Here are the errors that are coming up in my error_log Notice: Undefined index: andatum in /zipcode.php on line 11 Notice: Undefined index: andatum in /zipcode.php on line 12 Notice: Undefined index: abdatum in /zipcode.php on line 13 Notice: Undefined index: zimmer in /zipcode.php on line 14 Notice: Undefined index: city in /zipcode.php on line 39 Notice: Undefined index: state in /zipcode.php on line 41
3
5511
by: number1yan | last post by:
Can anyone help me, i am creating a website and am using a php script that recomends the website to other people. I keep getting the same error and can not work out why. The error is: Notice: Undefined index: FriendName in D:\Yan\Over_8\SendEmail.php on line 4, Notice: Undefined index: FriendEmail in D:\Yan\Over_8\SendEmail.php on line 5, Notice: Undefined index: Name in D:\Yan\Over_8\SendEmail.php on line 6, Notice: Undefined index: Email...
15
4499
by: bill | last post by:
I am trying to write clean code but keep having trouble deciding when to quote an array index and when not to. sometimes when I quote an array index inside of double quotes I get an error about enased whitespace (to my best memory) AT other times I get an undefined index notice as below: Notice: Undefined index: last_reminder_id in...
5
7201
by: siyaverma | last post by:
Hi, I am new to php, i was doing some small chnages in a project developed by my collegue who left the job and i got the responsibility for that, After doing some changes when i run it on my local server it was working fine but giving some errors those are Notice: Undefined index: phplogin in C:\Inetpub\wwwroot\sampleft\index.php on line 116 Notice: Undefined variable: username in C:\Inetpub\wwwroot\sampleft\index.php on line 116 ...
3
3885
by: sickboy | last post by:
$channels=$_GET; if (empty($channels)) { $channels='blank'; } changechannels($channels); $theatre=$_GET; if (empty($theatre)) { $theatre='splash'; } changetheatre($theatre); $info=$_GET; if (empty($info)) { $info='noinfo'; } changeinfo($info); Hey everyone, I keep getting an error regarding the above code. These are the errors: Notice: Undefined index: channels in /home/forcefed/public_html/index.php on line 5
3
6020
by: razvanel442 | last post by:
Hi all i am new here! I take a look on forum but i don't found a the answer for my problem ok this is my problem: Line47:$user = $_GET; Line48:$pass = $_GET; Line49:$char = $_GET;
3
2052
by: mediator | last post by:
Hello I have a php contact email form on my a ecommerce shop website ! I am getting a Undefined index error messages coming from the top of the php code, the email form its self works fine, HERE IS THE ERROR MESSAGES Notice: Undefined index: Name in E:\domains\t\tools2diy.co.uk\user\htdocs\contact.php on line 13 Notice: Undefined index: Tel in E:\domains\t\tools2diy.co.uk\user\htdocs\contact.php on line 14
1
11052
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10540
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9727
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8099
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7249
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6140
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3359
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.