Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Displaying Form Results In A New URL - JS Help Needed

Featured Replies

Hi

 

I'm putting together the following website, HGV/LGV Training and have an issue regarding a form submit action. Basically I've used an open-source script for the search form so can't get any support from the Author.

 

My problem is that I need the search results to appear in a different URL but at the moment they just appear in a new DIV on the home page. My knowledge of JS is limited and can't get my head around what the open-source script is doing. I think the relevant section of the search form is as follows:

 

<form method=post action=<?echo $_PHP_SELF;?>>

 

<input type="text" name="zipcode">

 

<? echo show_country_codes(); ?>

 

Any help on this would be greatly appreciated.

 

Keith.

Hi

 

I'm putting together the following website, HGV/LGV Training and have an issue regarding a form submit action. Basically I've used an open-source script for the search form so can't get any support from the Author.

 

My problem is that I need the search results to appear in a different URL but at the moment they just appear in a new DIV on the home page. My knowledge of JS is limited and can't get my head around what the open-source script is doing. I think the relevant section of the search form is as follows:

 

<form method=post action=<?echo $_PHP_SELF;?>>

 

<input type="text" name="zipcode">

 

<? echo show_country_codes(); ?>

 

Any help on this would be greatly appreciated.

 

Keith.

 

hmmmm if i were you just change that php self to the webpage you want the results to appear on and also process the php on the same page and then it should display the results you want on that page hope this helped

You will find in the head of the page a section of PHP code that is handling your form, you will need to create a new results page that looks how you want it etc, paste the PHP form handling code into the head of that page, and then change the form action:

 

action="<?echo $_PHP_SELF;?>"

 

to

 

action="/yourresultspage.php"

 

so that the results page handles the form.

 

If you post the contents of your <head> section I could probably tell you more clearly

 

also make sure your form action and method are in quotes

 

stevo

  • Author

hmmmm if i were you just change that php self to the webpage you want the results to appear on and also process the php on the same page and then it should display the results you want on that page hope this helped

[/quote

 

Now working perfectly, your advice is much appreciated thanks.

hmmmm if i were you just change that php self to the webpage you want the results to appear on and also process the php on the same page and then it should display the results you want on that page hope this helped

[/quote

 

Now working perfectly, your advice is much appreciated thanks.

 

No problem :yahoo:

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.