Topic: Need Help Understanding This Piece Of Php Code

Hi,

Need a little help here.

I would like to understand what this piece of code is doing, in particular what the question mark and colon are for. Here is the code:

$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;

Thanks

Reference:
https://www.dreamincode.net/forums/forum/28-php/
advertising online

Thumbs up

Re: Need Help Understanding This Piece Of Php Code

Being a web developer at a reputed web development services company we use this code as Php mail function to send emails when a user fills the form on a website.

Thumbs up