[Solved] Issues with my login [closed]

[ad_1] Go to your common.php file. $username = “dbusername”; $password = “dbpassword”; Change above 2 lines with your host’s username and password. Most likely: $username = “root”; $password = “”; or, may be you are using your localhost settings on a remote web server. Change below lines with respective details. $username = “dbusername”; $password = … Read more

[Solved] Find if last two characters in filename are numbers [closed]

[ad_1] This should do the trick. <?php $filename = “http://www.nws.noaa.gov/weather/images/fcicons/skc23.jpg”; $posOfPeriod = strrpos($filename, “.”); $last2digits = substr($filename, $posOfPeriod -2, 2); if (is_numeric($last2digits)) { echo “Numeric: “.$last2digits; } else { echo “Non-Numeric: “.$last2digits; } ?> 4 [ad_2] solved Find if last two characters in filename are numbers [closed]

[Solved] PHP – File to Associative Array with 1 key and two values attached

[ad_1] Try this // file path $file=”orderdata.txt”; // REMEMBER TO MENTION THE CORRECT FILE WITH EXTENSION // open the file and get the resource handle with errors suppressed $handle = @fopen($file,’r’); // DONT USE @ while at development since it will suppress errors // array to hold our values $params = array(); if($handle) { // … Read more

[Solved] How to send emails in large quantities with PHP script and cronjobs [closed]

[ad_1] You should have a database table with these columns: =============== Suscribers Table =============== |id (int)|email (varchar)|sent (tinyint) |1|[email protected]|0 |2|[email protected]|0 |3|[email protected]|0 Then something like this PHP script: // DB Connection require_once ‘db.php’; // Check if we have users with a 0 sent value $query = mysql_query(“SELECT COUNT(id) FROM suscribers WHERE sent = 0”); $results = … Read more

[Solved] Insecure call on WordPress Site

[ad_1] I visited your site. You are loading mixed content, as can be seen through the following Chrome console warning: Mixed Content: The page at ‘https://rideyellow.com/‘ was loaded over HTTPS, but requested an insecure video ‘http://rideyellow.com/wp-content/uploads/2017/01/RideYellow_1.mp4‘. This content should also be served over HTTPS. Also, you do have a form element in line 247, but … Read more

[Solved] Error in PHP Search [duplicate]

[ad_1] You should check if $_POST[‘searchterm’] is set first. It will only be set when the form is submitted. Also don’t use Mysql_ functions. They are deprecated. Would advice you to use MySQLI since they have protection against SQL Injection attacks etc. if(isset($_POST[‘searchterm’])) { $search = mysql_real_escape_string($_POST[‘searchterm’]); $find_books = mysql_query(“SELECT * FROM `listings` WHERE `title` … Read more

[Solved] Setting up a log-in for a website using PHP [closed]

[ad_1] in a nutshell: login.php <?php session_start(); function hhb_tohtml($str) { return htmlentities($str, ENT_QUOTES | ENT_HTML401 | ENT_SUBSTITUTE | ENT_DISALLOWED, ‘UTF-8’, true); } $accounts=array( //username =>password ‘smith’=>’smell’, ‘admin’=>’password’, ‘guest’=>’guestpass’ ); if(array_key_exists(‘submit’,$_POST)){ if(!array_key_exists(‘username’,$_POST)){ $username=””; } else { $username=$_POST[‘username’]; } if(!array_key_exists(‘password’,$_POST)){ $password=”; }else { $password=$_POST[‘password’]; } if(!array_key_exists($username,$accounts)){ die(‘This username does not exist.’); } if($accounts[$username]!==$password){ die(‘wrong password!’); } $_SESSION[‘logged_in’]=true; … Read more

[Solved] Insert into a table MYSQL

[ad_1] Ok, there was a syntax error. mysql_query(“INSERT INTO privado (usuario_nombre, titulo, partitura, video, instrumentos, valoracion, votos, descripcion, etiquetas) VALUES (‘”.$nick.”‘, ‘”.$titulo.”‘, ‘”.$partitura.”‘, ‘”.$video.”‘, ‘”.$instrumentos.”‘, 0, 0, ‘”.$descripcion.”‘, ‘”.$etiquetas.”‘)”); There was a braket missing. Thanks for your help. 1 [ad_2] solved Insert into a table MYSQL

[Solved] .BLADE.PHP IS NOT WORKING IN MY LARAVEL PROJECT. .PHP IS WORKING FINE FOR MY VIEWS

[ad_1] All I can suggest on the information you provided is: Make sure when you put your views inside other folders you use dot syntax and not slashes like this: View::make(‘folder.view’); Instead of View::make(‘folder/view’); Folder Structure: |views| –|folder| —-view.blade.php 0 [ad_2] solved .BLADE.PHP IS NOT WORKING IN MY LARAVEL PROJECT. .PHP IS WORKING FINE FOR … Read more