Questions tagged as 'php'

1
answer

form does not insert into the database

I have a HTML with this code: <div class="row"> <form method="post" action="php/mensagem.php" accept-charset="utf-8"> <div class="row"> <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12"> <in...
asked by 09.07.2015 / 11:50
1
answer

Creating a set of variables in PHP

I'm new to PHP, and I have some doubts. I noticed that when variables are created, the types are not specified. Thus: How do I create short, int, and char variables? Does it create the type of variable at startup of it? And how could...
asked by 27.07.2015 / 15:59
3
answers

Keep selected option loaded dynamically

I need to keep the option chosen in the combobox after the page is submitted, I have a function that does this, but only for combobox static, for the dynamic combobox it does not work. I'm already searching for hours and can not find anything....
asked by 03.08.2015 / 01:15
1
answer

PHP Build-in class does not work in CakePHP 3.0

I'm trying to use a class Built-in of PHP inside CakePHP but it's returned one:    Error: Class 'App \ Controller \ Component \ DateTime' not found Where it's being used: public function listNewBanners($newBannersQuantit...
asked by 30.07.2015 / 19:23
1
answer

How to make var_export export array in short syntax

According to the PHP Manual, on the var_export function    var_export() gets structured information about a given variable. She   is similar to var_dump() with one exception: the returned representation is a   valid PHP c...
asked by 15.07.2015 / 17:24
1
answer

MySql insert with "Connection" between inserts

I have a problem here. I need to upload multiple files and insert them into different tables. The product table contains the details of the products and the photos table the files to access the images, but I need to list them according to...
asked by 20.07.2015 / 21:17
1
answer

Using% in html files

I noticed that some web pages use %header% and %footer% to put the header and the footer among other things (I saw this in themes for the OpenGame Panel), I did not understand how they work and how the browser will get it header...
asked by 22.07.2015 / 23:43
1
answer

What is this __set_state that appears in var_export?

The var_export is used to export the data of a given value as a valid php code. However, when I use it in an object of class stdClass , it returns me the following code: stdClass::__set_state(array( 'one' =>...
asked by 15.07.2015 / 17:35
2
answers

How to loop posts in WordPress?

I personally need to create this layout for articles in my WordPress loop and I do not know as I could do. I know I'll need some instructions on PHP and some Bootstrap implementations, I'm using this CSS framework. Does anyo...
asked by 20.07.2015 / 23:14
2
answers

How to stipulate details with a SELECT [closed]

Well, I gave a SELECT, to pull my data, only I wanted to do the following: If $ category is 1, it would be called World, and if $ category equals 2, it would be called Moon, how can I do that? Code: <?php $conect = mysql_query("SEL...
asked by 23.07.2015 / 21:15