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.

Couple simple questions

Featured Replies

1. Do you prefer creating forms and scripts as 2 separate PHP files, such as signup_form.php and signup_script.php or do you just do it all in the 1 file?

 

2. When calling things like session_start(); or database connections, do you do them on each individual script and then close the connection at the end of the script, or do you call session_start and the db connections above the <html> tag on the page then write the individual scripts without them in.

 

At the moment I am using separate form and script files and calling dbconnections and session_start in each script, I'm wondering if it would be more efficient to do it the other way.

1) I find two separate files work best

2) Create a file that you can include that will do all your basic php startup such as db connection, any ini settings and start your session, then just include that with each page that needs it

  • Author

So how I'm doing it is ok, no need to do it at the top of the page, just on the external script files

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.