[Solved] Parse error: syntax error, unexpected end of file in C:\Program Files\EasyPHP-12.1\www\Sitedeteste\upload.php on line 37 [closed]

Wooble is correct, you are missing a closing bracket on one of your if statements. The following code should do the trick <?php //Funcao que vai abrir o arquivo php que faz conexao com o servidor require_once (“sistemadelogin.php”); $descricao = $_POST[descimagem]; $nomeFOTOG = $_FILES[‘fotoimagem’][‘name’]; $nomeFOTOP = $_FILES[‘miniImagem’][‘name’]; $tmpFOTOG = $_FILES[‘fotoimagem’][‘tmp_name’]; $tmpFOTOP = $_FILES[‘miniImagem’][‘tmp_name’]; $destinoG = … Read more

[Solved] Hotmail and yahoo html newsletter mail issue [closed]

HTML and CSS in email design is a pain, basically – every email client renders differently, with Outlook in particular being frustrating due to using Word as its rendering engine. Campaign Monitor post a very useful summary of all the CSS that will or won’t work in which of the email clients: http://www.campaignmonitor.com/css/ solved Hotmail … Read more

[Solved] I’m trying to use this code to add items to the database, but it doesn’t add them to database. How to use POST METHOD using PHP CODE with ajax?

I’m trying to use this code to add items to the database, but it doesn’t add them to database. How to use POST METHOD using PHP CODE with ajax? solved I’m trying to use this code to add items to the database, but it doesn’t add them to database. How to use POST METHOD using … Read more

[Solved] A specific htaccess inquiry [closed]

I think, this doesn’t really make sense. As stated in the comments, you can use mod_rewrite to send your shortened URLs to the controller, but controller and function need to be static. So having a separate function doesn’t really help, controller should be enough. One thing you could do is selecting the RewriteRules in your … Read more

[Solved] How to import images in a bulk import function? [closed]

You can use as bellow script for CSV $row = 1; $counter = 0; $urls = array(); $desdir = “Destination_DIR_URL”; //Ex: 250×250/ for current directory, create the directory with named 250×250 if (($handle = fopen(“targetfile.csv”, “r”)) !== FALSE) { while (($data = fgetcsv($handle, 1000, “,”)) !== FALSE) { $num = count($data); $counter++; $row++; if($counter > … Read more

[Solved] How to take md5 of a file in php? [duplicate]

Hey mate looks like quick search will find heaps about this check this out PHP Session timeout first, store the last time the user made a request <?php $_SESSION[‘timeout’] = time(); ?> in subsequent request, check how long ago they made their previous request (10 minutes in this example) <?php if ($_SESSION[‘timeout’] + 10 * … Read more

[Solved] Error with resolution operator while referencing model type depending on dynamic variable (PHP 5.2)

I have found the answer here: http://php.net/manual/en/language.oop5.paamayim-nekudotayim.php The Scope Resolution Operator (also called Paamayim Nekudotayim) or in simpler terms, the double colon, is a token that allows access to static, constant, and overridden properties or methods of a class. When referencing these items from outside the class definition, use the name of the class. As … Read more

[Solved] How to tell who is logged in PHP? [closed]

$_SESSION A session is a way to store information (in the form of variables) to be used across multiple pages. <?php // this line starts the session and must be present in any page where you need to set or retrieve a session variable session_start(); // this sets variables in the session $_SESSION[‘userid’]=’123′; //obv it … Read more

[Solved] number_format(): Argument #1 ($num) must be of type float [closed]

Pluck will still return a collection. You’d need to iterate through it, either with another foreach loop, or such as through map, etc: @foreach($amazings as $product) @foreach($product->prices->pluck(‘value’)->all() as $val) {{ number_format($val) }} @endforeach @endforeach solved number_format(): Argument #1 ($num) must be of type float [closed]

[Solved] Use of -> in PHP and C++ [duplicate]

It allows you to access properties on an object; In PHP class Car { public $make; public $model; public function setMake($make) { $this->make = $make; } public function setModel($model) { $this->model = $model; } public function getMake() { return $this->make; } public function getModel() { return $this->model; } } $car = new car(); $car->setMake(“BMW”); $car->setModel(“Three … Read more