connect an if statement to an input php

Solutions on MaxInterview for connect an if statement to an input php by the best coders in the world

showing results for - "connect an if statement to an input php"
Fox
04 Jun 2020
1
2re: #80305
3
4Again useful for newbies:
5
6if you need to compare a variable with a value, instead of doing
7
8<?php
9if ($foo == 3) bar();
10?>
11
12do
13
14<?php
15if (3 == $foo) bar();
16?>
17
18this way, if you forget a =, it will become
19
20<?php
21if (3 = $foo) bar();
22?>
23
24and PHP will report an error.
25
Tim
03 Nov 2016
1<input type="hidden" name="q" value="<?php echo isset($_GET["q"]) ? $_GET["q"]: '' ;?>"/>
2