PHP - Offering Php, Mysqli, Html, Css And Javascript Services
Hello, I'm Paul Ryan.
I am 23 years old and have around 8 years experience in programming with the following languages:
- PHP
- MySQLi
- HTML
- CSS
- JavasScript (jQuery, AJAX)
I have worked on many project over the years, including the following:
- BoxSelect.com
- Taccd.com
- FTA.ie
- BelfastCookerySchool.com
- Dittnyebad.no
- MassasjeShop.no
- Project: Universe (Personal Project)
I have worked on many other smaller jobs, updating outdated code, database and code optimizations etc.
You can contact me via the following methods:
- PHP Freaks Personal Message
- Skype: paulryanmc91
- E-mail: paul.ryan.mclaughlin@gmail.com
I am available to start work immediately whether the job be big or small, don't hesitate to contact me.
Thanks for your time, look forward to hearing from you.
Kind Regards,
Paul Ryan
Edited by PaulRyan, 17 October 2014 - 08:24 AM. Similar TutorialsThis topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=331336.0 Hello all. Is it possible to have a link that can start and stop a service on the web server? It is a windows 2003 server. Thanks, Mike I have currently developed a script that consumes a web service. It is running real slow. I think this is due to the web service provider. How do I diagnose/measure this? This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=305914.0 I want to purchase cloud servers from DigitalOcean, however I know very little about managing and maintaining servers (I just develop the websites). I know what I need without knowing how to do it. I read the conditions for hosting at PHP Fog, and they state that I can't use session variables as such variables are not copied between servers. Therefore I changed session variables for login info, language selection etc to cookies. Hence my own code is now free from session varibables, but Zend that I use for e.g. OAuth is not. Is it typical that cloud hosting providers disallow session variables for the above reason, or are there others that can handle such replication between servers? If not, is work going on to remove use of session variables from popular frameworks? Cheers, Anders hello, i am hoping someone can help, been working on my own mvc with help from tutorials, but i am stuck with this error: Fatal error: Class 'services' not found in C:\xampp\htdocs\Workspace\Cyberglide\libs\Bootstrap.php on line 27 were it says services that changes when i type a different item in the url, loads the error page but says that at the bottom of the page. hoping someone can help me where i gone wrong: Code: [Select] <?php class Bootstrap { function __construct() { $url = isset($_GET['url']) ? $_GET['url'] : null; $url = rtrim($url, '/'); $url = explode('/', $url); //print_r($url); if (empty($url[0])) { require 'controllers/index.php'; $controller = new Index(); $controller->index(); return false; } $file = 'controllers/' . $url[0] . '.php'; if (file_exists($file)) { require $file; } else { $this->error(); } $controller = new $url[0]; $controller->loadModel($url[0]); // calling methods if (isset($url[2])) { if (method_exists($controller, $url[1])) { $controller->{$url[1]}($url[2]); } else { $this->error(); } } else { if (isset($url[1])) { if (method_exists($controller, $url[1])) { $controller->{$url[1]}(); } else { $this->error(); } } else { $controller->index(); } } } function error() { require 'controllers/error.php'; $controller = new Error(); $controller->index(); return false; } hope someone can help, many thanks guys. hello dear PHP-experts i run opensuse 13.2 i ve set up an apache webserver - well - if i type localhost into the browser then i see: it works but i want to see also phpmyadmin: the phpmyadmin on apache server - installed but not visible - what can i do now. I think that i have to check the running services on the machine!!? Which test can be done - with the terminal ? Which tests can i run on commandline ? love to hear from you greetings finder.com.au is making waves in the comparison space, and we are expanding our Design & Technology team massively this year. We are looking for several full-stack Senior PHP Developers who will be responsible for building a wide variety of web-based applications (using PHP and MySQL) in addition to maintaining existing PHP code, optimizing website and database performance and developing custom PHP solutions. This is a great opportunity for web people at heart to join a growing team delivering awesome products that get used by hundreds of thousands of users. As a developer at finder.com.au you will have the freedom, autonomy, and responsiblity to improve the code, tools, and architecture without having to cut through red tape.
Why finder.com.au?
We've just been named one of the top service companies in the Asia Pacific for 2014, taking silver in the Stevie Awards for Australian Service Company of the year.
We’ve also been dubbed one of Anthill’s 50 coolest companies in Australia for 2013 thanks to our amazing team, wonderful users and cool company culture. As a development team, we move quickly, releasing code several times per day. You need to be willing to move fast, rely on automation, make decisions on less than perfect information, trust your teammates, and constantly strive to improve.
A new Head of Design and Technology, with experience at two of local startup scene’s biggest success stories, recently joined us to lead the team on a mission to speed up the entire company to become the Australian brand for comparison. The team runs hackdays every other month that give all developers free time to show off their creativity and innovation. You will have choice of OS, laptop or desktop, IDE and toolset, and up to 3 monitors. What’s more, you will experience an ultra modern office located in the heart of the Sydney CBD, catered lunches and breakfast supplied every day and all the snacks and drinks you want!
Who are you?
You live and breathe development and your code has soul. You are a great PHP coder that wants to join a team where you can flex your skills and grow further. You are an expert who understands complex problems and enjoys deploying solutions to business problems. You are keen to get your projects live and solve business problems and improve the development environment and tooling. You also have experience in getting code live multiple times per day.
You may be applying from overseas – We are happy to provide support with sponsored relocation services. We already have a number of people on our team from overseas so you will be joining a community.
Must have experience:
4+ years of PHP development experience for Senior Roles
Experience with phpunit
Knowledge of CI tools (Bamboo, Travis, CircleCI)
Knowledge of CD tools (Beanstalk, Capistrano)
Knowledge of Git
Ability and desire to use and extend Git tools (GitHub, Bitbucket) to enhance workflow
Ability to mentor junior developers
Experience with Wordpress beneficial
Knowledge of Front End technologies beneficial
Knowledge of monitoring tools beneficial
Please send us a resume to iwantin@finder.com.au and optionally provide us with a link to your GitHub or Bitbucket profile and a personal note as to why you would want to work with us at finder.com.au.
Hello everyone, For two weeks now, I'm trying to get this database connection in my query. Can someone give me a solution and tell me what I've done wrong? Am I overlooking something? <?php class Mysql{ public function connect(){ $mysqli = new mysqli('localhost','root','','login'); } } class Query extends Mysql{ public function runQuery(){ $this->result = parent::connect()->query("select bla bla from bla bla"); } } $query = new Query; $query->runQuery(); ?> Ok I am trying to use mysqli instead of the usual mysql. Mysql would be outdated. With mysqli, sgl-injection is impossible if you use the "?" in those codes. I would normally use a function but I've made a simple script to find the error. I use $parameters and $sql because these are the data I need to give as parameters to the function, so I used it here too but without the function actually. Code: [Select] ini_set('display_errors',1); // 1 == aan , 0 == uit error_reporting(E_ALL | E_STRICT); # sql debug define('DEBUG_MODE',true); // true == aan, false == uit $userid = 11; $lang = 1; $newLink = "testing123"; $db_host = "localhost"; $db_gebruiker = "root"; $db_wachtwoord = ''; $db_naam = "projecteasywebsite"; $sql= "INSERT tbl_link(userid,linkcat,linksubid,linklang,linkactive,linktitle) VALUES(?, ?, ?, ?, ?, ?)"; $parameters = '"iiisis", $userid, 1, 0, $lang, 1, $newLink'; echo $parameters; $mysqli = new mysqli($db_host, $db_gebruiker, $db_wachtwoord, $db_naam); $stmt = $mysqli->prepare($sql); $stmt->bind_param($parameters); $stmt->execute(); echo "<br><br>". mysqli_connect_errno(); echo "<br><br>". mysqli_report(MYSQLI_REPORT_ERROR); $stmt->close(); $mysqli->close(); I got Wrong parameter count for mysqli_stmt::bind_param() So naturally a problem when we execute : Warning: mysqli_stmt::execute() [mysqli-stmt.execute]: (HY000/2031): No data supplied for parameters in prepared statement ($stmt->execute() Is someone using mysqli too ?
The below code produces a dropdown and when a selection is made and submitted produces --------------------------------------------------------------------------- <!DOCTYPE><html><head> <title>lookup menu</title> </head> <body><center><b> <form name="form" method="post" action=""> <?php // error_reporting(0); error_reporting(E_ALL ^ E_NOTICE); include 'homedb-connect.php'; //This creates the drop down box echo "<select name= 'target'>"; echo '<option value="">'.'--- Select account ---'.'</option>'; $query = mysqli_query($con,"SELECT target FROM lookuptbl"); $query_display = mysqli_query($con,"SELECT * FROM lookuptbl"); while($row=mysqli_fetch_array($query)) {echo "<option value='". $row['target']."'>".$row['target'] .'</option>';} echo '</select>'; ?> <input type="submit" name="submit" value="Submit"/> </form><center> <?php // error_reporting(0); error_reporting(E_ALL ^ E_NOTICE); include 'homedb-connect.php'; if(isset($_POST['target'])) { $name = $_POST['target']; $fetch="SELECT target, purpose, user, password, email, visits, date, saved FROM lookuptbl WHERE target = '".$name."'"; $result = mysqli_query($con,$fetch); if(!$result) {echo "Error:".(mysqli_error($con));} //display the table echo '<table border="1"><tr><td bgcolor="#ccffff" align="center">lookup menu</td></tr> <tr><td> <table border="1"> <tr> <td> Target </td> <td> Purpose </td> <td> User </td> <td> Password </td> <td> Email </td> <td> Visits </td> <td> Date </td> <td> Saved </td> </tr>'; while($data=mysqli_fetch_row($result)) { $url= "http://localhost/home/crud-link.php?target=". $data[0]; $link= '<a href="'.$url.'">'. $data[0]. '</a>'; echo ("<tr><td> $link </td><td>$data[1]</td><td>$data[2]</td><td>$data[3]</td> <td>$data[4]</td><td>$data[5]</td><td>$data[6]</td><td>$data[7]</td></tr>"); } echo '</table> </td></tr></table>'; } ?> </body></html>
When running the following code i get the error: Call to undefined method mysqli::errno() the code: $conn = new mysqli(HOST, USER, PASSWORD, DATABASE); if ($conn->errno() !== 0) { $msg = $conn->error(); throw new connErrorException($msg, 'Connect'); } I am fairly new to classes but as i understand it this should be correct. I am using mysql 5.1 so mysqli is on by default. I have even checked the php ini and everything looks fine there in respect to this. Any advice? I have just started using MySQLi and am clueless it is giving me the follow errors in which i do not understand
Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in C:\xampp\htdocs\Login\connect.php on line 23 Notice: Trying to get property of non-object in C:\xampp\htdocs\Login\connect.php on line 25 Notice: Use of undefined constant mysqli - assumed 'mysqli' in C:\xampp\htdocs\Login\connect.php on line 32 Warning: mysqli_query() expects parameter 1 to be mysqli, string given in C:\xampp\htdocs\Login\connect.php on line 32 Warning: mysql_fetch_assoc() expects parameter 1 to be resource, null given in C:\xampp\htdocs\Login\connect.php on line 33 can someone please explain to me why i am getting these? and my code is $mysqli_db = mysqli_select_db("$db_name"); if($mysqli_db->connect_errno) { printf("Database not found: %s\n", $mysql->connect_error); exit(); } $sql = "SELECT * FROM $tbl_name WHERE username='$username' AND password='$password'"; $result = mysqli_query($sql); $row = mysqli_fetch_assoc($result);I just got rid off most the errors the only ones left are Warning: mysqli_query() expects at least 2 parameters, 1 given in C:\xampp\htdocs\Login\connect.php on line 32 Fatal error: Call to undefined function mysqli_result() in C:\xampp\htdocs\Login\connect.php on line 33 Code Updated: $mysqli_db = mysqli_select_db($mysqli_connect, $db_name); if(!$mysqli_db) { printf("Database not found: %s\n", $mysqli->connect_error); exit(); } $sql = "SELECT * FROM $tbl_name WHERE username='$username' AND password='$password'"; $query = mysqli_query($sql); $result = mysqli_result($query); $row = mysqli_fetch_assoc($result); Edited by Tom8001, 30 November 2014 - 12:43 PM. Hi, The following code is what I want in that it creates a menu and I can select and display a table row.
I still need to use that selection to update the "lastused". I really appreciate your help. <!DOCTYPE><html><head><title>email menu</title></head> <body><center> <form name="form" method="post" action=""> <?php $con=mysqli_connect("localhost","root","cookie","homedb"); //============== check connection if(mysqli_errno($con)) {echo "Can't Connect to mySQL:".mysqli_connect_error();} else {echo "Connected to mySQL</br>";} //This creates the drop down box echo "<select name= 'target'>"; echo '<option value="">'.'--- Select email account ---'.'</option>'; $query = mysqli_query($con,"SELECT target FROM emailtbl"); $query_display = mysqli_query($con,"SELECT * FROM emailtbl"); while($row=mysqli_fetch_array($query)) {echo "<option value='". $row['target']."'>".$row['target'] .'</option>';} echo '</select>'; ?> <input type="submit" name="submit" value="Submit"/><!-- update "lastused" using selected "target"--> </form></body></html> <!DOCTYPE><html><head><title>email menu</title></head> <body><center> <?php $con=mysqli_connect("localhost","root","cookie","homedb"); if(mysqli_errno($con)) {echo "Can't Connect to mySQL:".mysqli_connect_error();} if(isset($_POST['target'])) { $name = $_POST['target']; $fetch="SELECT target,username,password,emailused,lastused, purpose, saved FROM emailtbl WHERE target = '".$name."'"; $result = mysqli_query($con,$fetch); if(!$result) {echo "Error:".(mysqli_error($con));} $lastused = "CURDATE()"; // update "lastused" using selected "target" //display the table echo '<table border="1">'.'<tr>'.'<td bgcolor="#ccffff align="center">'. 'Email menu'. '</td>'.'</tr>'; echo '<tr>'.'<td>'.'<table border="1">'.'<tr>'.'<td bgcolor="#ccffff align="center">'.'target'.'</td>'.'<td bgcolor="#ccffff align="center">'.'username'.'</td>'.'<td bgcolor="#ccffff align="center">'.'password'.'</td>'.'<td bgcolor="#ccffff align="center">'.'emailused'.'</td>'.'<td bgcolor="#ccffff align="center">'.'lastused'.'</td>'.'<td bgcolor="#ccffff align="center">'.'purpose'. '</td>'.'<td bgcolor="#ccffff align="center">'. 'saved' .'</td>'.'</tr>'; while($data=mysqli_fetch_row($result)) {echo ("<tr><td>$data[0]</td><td>$data[1]</td><td>$data[2]</td><td>$data[3]</td><td>$data[4]</td><td>$data[5]</td><td>$data[6]</td></tr>");} echo '</table>'.'</td>'.'</tr>'.'</table>'; } ?> </body></html> I am using mysqli, OO, to connect to MySQL. I have only today started looking at this and am used to: Code: [Select] <?php $con = mysql_connect();//etc mysql_close($connection); ?> Am I right that with mysqli (OO) that I don't need to set a connection variable wither when connecting or closing?? Code: [Select] <?php mysqli::connect();//etc mysqli::close(); ?> What about with multiple databases, does mysqli keep track for me, as I am used to this: Code: [Select] <?php $con1 = mysql_connect();//db1 $con2 = mysql_connect();//db2 ?> //etc I dont know whether the statement is correct.....i just tried it.....and it didn't work. $stmt->bind_param('ssiiiss',$_POST['name'],$_POST['email'],$_POST['d'],$_POST['m'],$_POST['y'],$_POST['add'],$_POST['phone']); here my first two values are strings and next 2 tiny int's next is int and last 2 again strings. hello , I'm starting to use mysqli and i have few questions. is there a guide for mysqli? and how do i use this functions at mysqli ? mysql_num_rows mysql_query mysql_fetch_assoc mysql_fetch_array thanks , Mor. Hi everyone, I wanted to some investigating before I label this as a bug, but from what I can see I'm not getting expected results. It appears as if mysqli_stmt_result_metadata does not return the proper object. It should be of mysqli_result type, but yet when I run mysqli_num_rows against it, I get 0, always. If I do a direct mysqli_query and take the resultset back, I can call mysqli_num_rows and it returns the proper value. Example #1(doesn't work): if($this->statement = mysqli_prepare($this->databaseConnection, "SELECT 1 FROM DIGIUSERS WHERE UNAME = ?")) { mysqli_stmt_bind_param($this->statement, 's', $username); mysqli_stmt_execute($this->statement); $this->errorQuery(); $result = mysqli_stmt_result_metadata($this->statement); //Ooops, the username is already taken! exit with status of -7 if(mysql_num_rows($result) > 0) { mysqli_rollback($this->databaseConnection); exit("<STATUS>-7</STATUS></USER>"); } mysqli_stmt_close($this->statement); } Example #2 (works but i cant bind variables): $result = mysqli_query($this->databaseConnection, "SELECT 1 FROM DIGIUSERS WHERE UNAME = $username"); $this->errorQuery(); //Ooops, the username is already taken! exit with status of -7 if(mysqli_num_rows($result) > 0) { mysqli_rollback($this->databaseConnection); exit("<STATUS>-7</STATUS></USER>"); } I have variable binding working just fine elsewhere on the site so I know it's not that. The only thing I can think of is that mysqli_stmt_result_metadata is not returning the proper object. For now i will use #2 but, very begrudgingly.... Hi everyone,
I can’t understand what happens… When I try my site in WAMP, I have the follow errors: Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the futu use mysqli or PDO (…) Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in (…) The same happened with the connect to mysql, but I solved using mysqli extension. But in this case is totally diferente. When I use the mysqli_query or mysqli_num_rows that are the alternatives presented I receive again other error, in PHP Manual says: "function.mysqli-query doesn't exist. Closest matches:" Someone know solve this problem??? When I use MySQL <?php session_start(); if (isset($_SESSION["manager"])){ header("location:index.php"); exit(); } ?> <?php if(isset($_POST["username"])&&isset($_POST["password"])){ $manager=preg_replace('#[^A-Za-z0-9]#i','',$_POST["username"]); $password=preg_replace('#[^A-Za-z0-9]#i','',$_POST["password"]); $cnn= include "../lojascript/connect_mysql.php"; $sql=mysql_query($cnn, "SELECT id FROM admin WHERE username='$manager' AND password='$password' LIMIT 1"); $existCount=mysql_num_rows($sql); if ($existCount==1){ while ($row = mysqli_fetch_array($sql)){ $id=$row["id"]; } $_SESSION["id"]=$id; $_SESSION["manager"]=$manager; $_SESSION["password"]=$password; header("location:index.php"); exit(); }else { echo 'Informação incorrecta <a href="index.php"> Click here</a>'; exit(); } } ?>When I use MySQLi <?php session_start(); if (isset($_SESSION["manager"])){ header("location:index.php"); exit(); } ?> <?php if(isset($_POST["username"])&&isset($_POST["password"])){ $manager=preg_replace('#[^A-Za-z0-9]#i','',$_POST["username"]); $password=preg_replace('#[^A-Za-z0-9]#i','',$_POST["password"]); $cnn = include "../lojascript/connect_mysql.php"; $query= "SELECT id FROM admin WHERE username='$manager' AND password='$password' LIMIT 1"; $result= mysqli_query($cnn,$query) or die(mysqli_error()); $num_row = mysqli_num_rows($result); if ($num_row==1) { while ($row = mysqli_fetch_array($result)){ $_SESSION["id"]=$row["id"]; } $_SESSION["id"]=$id; $_SESSION["manager"]=$manager; $_SESSION["password"]=$password; header("location:index.php"); exit(); }else { echo 'Informação incorrecta <a href="index.php"> Click here</a>'; exit(); } } ?> |