• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Carey Brown
  • Frits Walraven

PHP Basics

Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

Good morning to you,

I have been creating simple index page in which i use one text box and submit button and i use php smarty also..

requirements are:
when i click after entering some text in text box, it should be posted into the another php ("companyinfo.php") ..

for instance, if i enter some company name in text box , it should fetch the corresponding row from the table.. and those records should be displayed in the "companyinfo.php"..

index.php codings are

javascript codings are:

companyinfo.php coding are

it shows the following error

Notice: Undefined index: search in C:\wamp\www\phpdemo\companyinfo.php on line 8

please rectify me..

Thanks in advance

Ranch Hand
Posts: 71
PHP Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using javascript? Why not simply define the form on index.php as follows:

This will be sure to send a POST request to the server. You javascript on the other hand simply use a GET, which doesn't pass any form data.
Space pants. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
    Bookmark Topic Watch Topic
  • New Topic