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.

I'm not usre how to do this...

Featured Replies

I'm a beginner to PHP and SQL databases, so go easy on me xD

 

So, I'm creating a small script where are user can post a message (only when logged in). The problem I have, is that I need the username to be attached to the posted message when entered in to the database.

 

If you have any ideas about how I do this, or can recommend me some websites which can help me, please tell me :3

 

-Thanks in advance, Dave

I don't know what your database schema is but I'm guessing you would want the relationship between users and messags to be 1:m so 1 user can have many messages, a message can only have one user (author). So to do this you'd need a foreign key in your messages table to indicate which user wrote that message. So the user_id column in the message would point to the users ID, then you'd join the two up when you pull the messages out.

 

SELECT * FROM messages INNER JOIN users ON users.id=messages.user_id;

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.