Questions tagged as 'echo'

2
answers

IF with 2 distinct variables for various scenarios

I'm trying to make a condition in php this way: $Telefone = ""; $Celular = ""; Where: If both empty shows echo sem Telefone e nem Celular If variable Phone = 222-2222% with% If instead echo Telefone: 2222-2222 If bot...
asked by 20.12.2018 / 02:05
0
answers

Write to a Shell Script file

I have a problem with writing a line in a file using Shell Script. I've tried to use sed and echo, but in both I do not have the expected behavior. Using sed: sed -i -e 'export LS_OPTIONS='--color=auto'' /root/.bashrc Using echo: echo...
asked by 26.11.2018 / 22:39
2
answers

Create php file with date and time in linux

Can anyone help me how can I create a php file to bring in the time and date? Well I have a case that php is taking a divergent time, I checked the php.ini, that's correct. I want to create a php test file to check.     
asked by 05.02.2018 / 18:43
1
answer

Show button if logged in / out if not

I want to show the "panel" button if the user is logged in, and if I do not want to show the login button, is it possible? Follow my code ... <?php if(isset($_SESSION['usuario'])){ "echo "<a href="logado.php" class="btn btn-succe...
asked by 07.02.2018 / 07:10
1
answer

Echo file with php tags

I'm developing an intra net portal for the company I work in, I'm using a central page and searching for the content of other pages via ajax, the other pages are outside the public_html folder so I use a controller to return the contents of thes...
asked by 31.10.2017 / 17:12
1
answer

Help to display bank data on screen

I'm doing an INNER JOIN between two tables in my bank. But I'm having trouble showing the result organized on the screen, could anyone help me? The tables are category and service (related to category). In the category table I have only the id a...
asked by 30.05.2017 / 21:03
1
answer

Select the values of the "select" through the "GET"

I'm trying and can not do the following: I thought of "automating" the process of reports of the system that I am doing, by registering the PRODUCT, you also register the name of the column id and the name of the product id, as follows: T...
asked by 30.03.2017 / 22:04
0
answers

Javascript function returns wrong Ajax

I am validating a registration with JS. There's a part like this: ... if( existUser() ){ alert(' Email já cadastrado.'); } else // ok , envia formulario ! The function Js that checks whether the user exists, calls a PHP, accesses the...
asked by 26.03.2017 / 18:54
1
answer

Display content of the title tag of the current page using PHP

Hello, I'd like some help modifying the code below: <?php function page_title($url) { $fp = file_get_contents($url); if (!$fp) return null; $res = preg_match("/<title>(.*)<\/title>/siU", $fp, $title_matches)...
asked by 09.08.2016 / 01:11
2
answers

for () is showing the same value as the array

Good afternoon, I'm trying to make a for () that shows the values for the current category. I use a function that takes the company and the category and selects the amount of records to display. Soon after, I use a similar function to show the p...
asked by 12.04.2016 / 20:07