Questions tagged as 'php'

2
answers

Validation numeric (12,2) Postgres

I have the following question, I have a field in the Postgresql database of type numeric (12,2) when sending a value of a form I did not find a way to validate the value in PHP to insert this value in the database. > Error generated: Numeric v...
asked by 15.10.2015 / 21:17
2
answers

How to make a form that accepts photo upload and save to the database

I created a database named Form and table with the following information contatos (id int A.I, nome varchar(30), idade int(2), foto(blob) I made that default form: <!DOCTYPE html> <html> <head> <meta charset=...
asked by 02.10.2015 / 14:42
2
answers

How to avoid user logout when closing browser with PHP?

I currently use SESSION . When I close the browser, it disconnects. How can I make a login at click on Continue connected, the user does not disconnect after closing?     
asked by 02.12.2017 / 17:05
1
answer

Like / Like Button

I want to make a button on my site with a counter next to it and I would like every time the counter to increase by 1 number. But I wanted to save that number of clicks on a file .txt on the server, and that everyone could click and see t...
asked by 10.06.2015 / 21:52
3
answers

Block access to pages containing ".php" with HTACCESS

I want to block direct access to files ending with the .php extension. Let's say I have a page called teste.php . If the user tries to access it by teste.php it will receive a 404. The only way the page can be accessed wou...
asked by 04.06.2015 / 19:02
2
answers

How to split a string with a delimiter in PHP? [duplicate]

I have a string "1b00bd515bf8cbc5a86f3b714361fab6" and I want to break it down like this: "1b00bd51-5bf8cbc5-a86f3b71-4361fab6" HOW DO I DO IT?     
asked by 27.04.2015 / 14:17
2
answers

Dynamic Link? And how to implement? [closed]

I do not know the name of this technique, I am a student, but sometimes I see in the lower left corner of the chrome the complete type link ... link Then suddenly it changes to: link I'm new to the web and forgive my ignorance if...
asked by 08.05.2015 / 06:14
2
answers

Youtube API V3 Information

Youtube has disabled API V2 and the new API (V3) is much more complicated to get information about videos. How can I get the following information from a video in the v3 API: Video title. Duration of the video (in seconds). How can I...
asked by 10.05.2015 / 21:44
3
answers

PHP code opens in browser

I'm not able to install PHP on my machine. When I run a page in the browser, it returns the code written in .php. I installed Apache 2.2.9 and PHP 5.2.1, and I made all the changes based on this tutorial Even with all the changes, it con...
asked by 07.05.2015 / 06:25
2
answers

PHP parametric functions

I'm new to php and I'm creating a comparison of box sizes, and for that I'd like to put inside a function but I do not know which parameter to put inside the function's relatives. Someone could help me, Thanks. <?php include("caixa.php");...
asked by 21.05.2015 / 17:49