Questions tagged as 'php'

4
answers

Login in PHP with permission levels

I have a problem with my code to separate the logins. I want when a login with Rank = 1 is entered it redirects to a page, and when Rank is = 0 go to another page. I tried to do but I did not have a result because he always...
asked by 18.04.2014 / 12:25
4
answers

Get ID of a YouTube video by URL

I have this string " link " and I want to get only the ID, ie from "? v="     
asked by 12.12.2014 / 17:08
2
answers

Is there a function to display the defined variables?

Is there a way to give a "var_dump" in all variables instantiated in that context, without having to put each one inside var_dump ()?     
asked by 27.12.2013 / 11:39
2
answers

How to force .txt files to be downloaded [duplicate]

I have a page, but I do not want it when I click on files of type .txt to download, instead of displaying them. I'm developing this page in PHP. I have seen some script on the WEB, however it is forcing the download of .txt files without it...
asked by 24.04.2014 / 14:17
4
answers

Is there any alternative to system ('cls') in PHP Console?

I'm using PHP (5.7) on the console (Windows 10), but I'm not able to clear the screen. I give system('cls') and only appears a square with a question mark, without cleaning the screen. I'vedoneitthisway:for($i=0;$i<50;$i++)echo"\r\...
asked by 26.12.2016 / 23:14
1
answer

Script that sends WhatsApp message?

Is it possible to send WhatsApp message via Script PHP ? (Like an SMS or email) I found a class but it is old and it no longer works (the servers have changed with the sale of WhatsApp and you need a password that I could not find [ l...
asked by 21.03.2014 / 18:48
4
answers

Difference between the mysql_connect () and mysqli_connect () functions in php

I wanted to know the difference between the two and which one is the best one to use. $x= mysqli_connect("localhost","my_user","my_password","my_db"); $y= mysql_connect("localhost", "my_user", "my_password"); Are some of them better or newe...
asked by 11.05.2015 / 18:44
6
answers

Do I use PHP within an HTML or HTML within a PHP?

I made my entire site in HTML and CSS, but now I need to use PHP to send some data to a database. But I have a question, if I modify all my documents to .php or if I use PHP within HTML (if it is possible).     
asked by 28.02.2014 / 01:56
5
answers

echo or print, what really is the best option?

I know of the differences of echo or print, but in a real project in PHP which one is the most suitable to use? Or just so much?     
asked by 09.02.2014 / 15:37
2
answers

How to check if the Term is contained in String in PHP?

I need to check if a given tag is within string . I get this string from the database that comes in the form of% com_with% separated by commas without spaces as below: String canais,proteses,implantes Term proteses...
asked by 22.11.2015 / 04:58