Redirect to the wrong route when submitting the form

I am submitting my login form and define the route action="{{route('signin')}}" but it is redirecting the user to the login route. form code is here . <form action="{{route('signin')}}" method="post" role="form"&

How to fade in a notification by clicking on a text field

Hi guys I need help (again). I wanted to learn how to make the notification or alert box fade-in and fade-out after clicking a editable textbox. This is the code for the alert box: <div class="alert alert-warning fade in"> <a href="

webservice.php Vtiger update Query String php curl post

Does any one know how to properly format the update query in vtiger to update a record under the Leads module? I have been following this: http://community.vtiger.com/help/vtigercrm/developers/third-party-app-integration.html and have been able to lo

change the color of a paragraph with php

I want to make a management panel for a web page. So first i wrote an input type to get the color from it: <form> <input type="text" name="test"> <input type="submit" value="Send"> <?php $color

How to copy a file to another directory after sending

I am trying to create a directory after a form submit, then after the form is submitted I want that directory to have a file stuffed inside of it. I have tried the php copy function and used an if statement to see if it was copying successfully but i

PHP threads (pthreads) work but there is no Stackable class

last few days I am using PHP threads (pthreads) with PHP 7.0.1 (with –enable-maintainer-zts in the configure) and all works well when using Thread or Worker. When I tried to create a class that inherits from Stackable for a Worker I got "Fatal error:

Where should I look for Yii2 log exception file

A beginner to Yii 2 framework, can anyone please tell me where do i find the log exception file or if have to create the file to store all exceptions then how should i create one ?If you're are using the Advanced Application Template, each app (front

Why does the site look different if it is printed with php?

I have strange problem, I make for example 3 files main.html style.css index.php, then when I open index.php which read main.html and print to output I get different appearance than when I opening main.html, do you know what I making wrong ? HTML: <!

How to analyze JSON Array with different keys at the same level

I have Array and i need to get summ of quantity * price. But the array keys on the third level is different. I use this PHP code but i only can take price & quantity for first item ['506-p1-8_p2-_p3-'] $quantity = $elements['1af7e792-bcff-4a6c-9bdb-d

Destroy PHP SESSION in Javascript function

I create a session in my php script. I want to destroy my php session in javascript. when I click on Destroy Session then javascript function destroy() call and destroy SESSION['user']. <?php ob_start(); session_start(); SESSION['user'] = "test 12

Indefinite index: image

Why is this not working? Trying to upload file using PHP. File in question is an image just need to store the file path. Trying this code but is not working. Any help? <html> <body> <form action="book_create.php" method="POST

Customize the exception template by grouping

How to customize exception by bundle? Example: I have two bundles: BackendBundle and FrontEndBundle. I want this two bundles to be handled by two different templates when error 404 is thrown. How can I do that? I had read http://symfony.com/doc/curre

Data entry in MySQL Table with PHP and A For Loop

So I'm having some trouble putting an array into a MySQL table. My goal is to put one element from the array into one row of the table, but that's not what happens. $cnt = count($array); for($i = 0; $i < $cnt; $i++) { mysql_query(" INSERT INTO $gr

Dynamically add private property to an object

I have a class: class Foo { // Accept an assoc array and appends its indexes to the object as property public function extend($values){ foreach($values as $var=>$value){ if(!isset($this->$var)) $this->$var = $value; } } } $Foo = new Foo; $Foo->

Upload to Slim Framework using curl in PHP

Possible Duplicate: Failing to upload file with curl in heroku php app After handling a file upload in php, I am trying to send that file using curl to my rest api which uses Slim Framework. However, $_FILES is always empty once it reaches the functi

Static Oddity :: Calling a Method That Contains $ this

In this example I get the fatal error "Fatal error: Using $this when not in object context" as expected class ctis_parent{ public function objFunc(){ var_dump('Called succes'); } public static function call(){ $this->objFunc(); } public funct

Variable $ _POST in a variable

Hey I have this code that sends an email with some data sent by a form: <?php if (isset($_POST['submit'])) { error_reporting(E_NOTICE); function valid_email ($str) { return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z

Get all objects without a loop in OOP MySQLi

This is how I get one record with MySQLi: $result = $db->query("..."); $image = $result->fetch_object(); Now I need to get the comments and pass it to the view. I'm doing this right now but it doesn't seem right: $result = $db->query(&q

Too much try / catch block for PDO

In the controllers class files, most of the method functions include try/catch block something like this: try { $stmt = $this->prepare($sql); $stmt->execute($params); $result = $stmt->fetchAll(PDO::FETCH_ASSOC); //foreach() or so on... } catch (E

Playing AVI with PHP readfile ()

I have embeded player in HTML: <OBJECT id=WindowsMediaPlayer1 width=320 height=264 hspace=5 vspace=5 classid=clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6 border="5" align="middle" > <param name="URL" value="http:/

The recursive MySQL function call eats too much memory and dies

I have the following recursive function which works... up until a point. Then the script asks for more memory once the queries exceed about 100, and when I add more memory, the script typically just dies (I end up with a white screen on my browser).