PHP - Mysqlnd Cannot Connect To Mysql 4.1+ Using Old Authentication
Hello,
I'm using WAMPSERVER on my PC (Windows7) and I'm trying to open a simply mysql_connect() connection in my php script to my remote MySQL database. I can connect through MySQL Query Browser fine, and everything worked fine before I moved web host recently. I'm experiencing the following error, when using the mysql_connect() function, and I'm definitely using the right credentials: Code: [Select] Warning: mysql_connect() [function.mysql-connect]: OK packet 6 bytes shorter than expected in D:\wamp\www\test.php on line 3 Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using old authentication in D:\wamp\www\test.php on line 3 Could not connect: mysqlnd cannot connect to MySQL 4.1+ using old authentication I've Googled to my heart's content, and I've read all about how people resolve this by logging into MySQL as root and resetting the password, so it uses the new hash (41 characters long) over the old has (16). I don't have root access to do this, and my webhost say they are not using old_passwords on their MySQL Server. I've spoken to my webhost twice, and they've told me the problem is at my end, with the MySQL client on my computer. I have the following versions, all running in the latest version of WAMPSERVER: MySQL: 5.1.36 PHP: 5.3.0 Apache: 2.2.11 The versions on the remote server (hostgator shared hosting): MySQL: 5.1.52 PHP: 5.2.4 Apache: 2.2.17 In MySQL Query Browser, when I run the following command: Code: [Select] SHOW VARIABLES LIKE 'old_passwords' It returns: old_passwords ON My web host said this was set somewhere on my machine, but I've gone through all my my.ini files, and there's no mention of it anywhere. I even tried setting it off by adding the line to the file, but no change. Here's my php code: <?php $link = mysql_connect("123.123.123.12:3306", "myusername_user", "8usJRBnIeddT"); if (!$link) { die('Could not connect: ' . mysql_error()); } echo "test2"; mysql_select_db("myusername_template", $link); $result = mysql_query("SELECT * FROM Test", $link); $num_rows = mysql_num_rows($result); echo "<h1>num:</h1>$num_rows Rows\n"; mysql_close($link); ?> Everything is working fine when I upload the files to the server (using localhost). Can anyone help me please? Spend approaching 6 hours on this one! Thank you so much. Similar TutorialsHello. Through MySQL, I created a database using the following code: Code: [Select] create database auth; use auth; create table authorized_users ( name varchar(20), password varchar(40), primary key (name) ); insert into authorized_users values ( 'username', 'password' ); insert into authorized_users values ( 'testuser', sha1('password') ); grant select on auth.* to 'webauth' identified by 'webauth'; flush privileges; Then I used the following code to set up a simple log in page. Code: [Select] <?php $name = $_POST['name']; $password = $_POST['password']; if ((!isset($name)) || (!isset($password))) { //Visitor needs to enter a name and password ?> <h1>Please Log In</h1> <p>This page is secret.</p> <form method="post" action="secretdb.php"> <p>Username: <input type="text" name="name"></p> <p>Password: <input type="password" name="password"></p> <p><input type="submit" name="submit" value="Log In"></p> </form> <?php } else { // connect to mysql $mysql = mysqli_connect("localhost", "webauth", "webauth"); if(!$mysql) { echo "Cannot connect to database."; exit; } // select the appropriate database $selected = mysqli_select_db($mysql, "auth"); if(!$selected) { echo "Cannot select database."; exit; } // query the database to see if there is a record which matches $query = "select count(*) from authorized_users where name = '".$name."' and password = sha1('".$password."')"; $result = mysqli_query($mysql, $query); if(!$result) { echo "Cannot run query."; exit; } $row = mysqli_fetch_row($result); $count = $row[0]; if ($count > 0) { // visitor's name and password combination are correct echo "<h1>Here it is!</h1> <p>I bet you are glad you can see this secret page.</p>"; } else { // visitor's name and password combination are not correct echo "<h1>Go Away!</h1> <p>You are not authorized to use this resource.</p>"; } } ?> When I open up this page, above "Please Log In", I get this error: Notice: Undefined index: name in C:\xampp\htdocs\learning\secretdb.php on line 2 Notice: Undefined index: password in C:\xampp\htdocs\learning\secretdb.php on line 3 Moreover, when I type in an authorized username and password, I get another error: Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'webauth'@'localhost' (using password: YES) in C:\xampp\htdocs\learning\secretdb.php on line 19 Cannot connect to database. Does anyone know what I'm doing wrong? I'm fairly new to PHP and MySQL and I'm pretty stuck. Thanks. hello, if i have an entry in a table called company on database cc, would the following be the propper code? im getting a blank page. Code: [Select] <?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'mike'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = 'cc'; mysql_select_db($dbname); $query = "SELECT * FROM company"; $result = mysql_query($query); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "Name :{$row['compant']} <br>" . "Subject : {$row['address']} <br>" . } ?> Hello all, This is my first post in here, so go easy. I recently transferred my account from my local ISP to GoDaddy. And now my search criteria is not working. I am getting the follow error message on the page of my search box, instead of the graphics itself: Could not connect to MySQL:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) I thought maybe this would be a simple error when I found out that GoDaddy does not use the "localhost" connect string. So I switched it to the local IP for GoDaddy still to no avail. I am lost after that. My PHP skills are limited. I was taught by a very advanced user who uses shortcuts and different strings self made for his ease. So looking online for solutions for the script was very hard(to me at least), because the lines of code do not match common scripts online. Is this a simple solution? Does the: global $dbc; @dbConnect(); function work with GoDaddy? Because I have seen maybe different ways to connect to a DB with PHP. Here's the script I am using to connect and extract results from the DB. Any and all help will be greatly appreciated. Thanks in advance. Using MySQL Version 4: <? @require("searchheader.php"); ?> <table cellpadding=10 cellspacing=0 border=0> <tr> <td align=left valign=top> <? displayMenu(); ?> </td> <td align=right valign=bottom> <? if($_GET["f_catid"]){ $num_cats = 5; for($i=1;$i<=$num_cats;$i++){ $where .= " or c".$i." = ".$_GET["f_catid"]; } $where = substr($where,4,strlen($where)); $sql = "select * from product where ".$where." order by product_name ASC LIMIT 0,20"; dbConnect(); $result = mysql_query($sql,$dbc); ?> <div class="search_results_menu"> <form action="[url=http://www.nexpart.com/extpart.php?part=]http://www.nexpart.com/extpart.php?part=[/url]<?=$r["part_number"]?>&linecode=<?=$row[" manufacturer"] ?>" method="GET"><input type="text" name="quantity" size="2" value="0" style="text-align: center;"><input type="button" name="submit_top" value="Check Out"> </form> <table class="search_results_found" bgcolor="#efefef" cellpadding=3 cellspacing=0 border=1 bordercolor="#000000" style="border:1px solid #000000;"> <tr bgcolor="#efefef"> <td class="search_results_title"><b>Manufacturer</b></td> <td class="search_results_title"><b>Part Number</b></td> <td class="search_results_title"><b>Part Name</b></td> <td class="search_results_title"><b>Price</b></td> <td class="search_results_title"><b>Image</b></td> <td class="search_results_title"><b>Add to Cart</b></td> </tr> <? if(mysql_num_rows($result) > 0){ while($row = mysql_fetch_assoc($result)){ ?> <tr bgcolor="#efefef"> <td><?=$row["manufacturer"]?></td> <td><a href="[url=http://www.nexpart.com/extpart.php?part=]http://www.nexpart.com/extpart.php?part=[/url]<?=$row["part_number"]?>&linecode=<?=$row["manufacturer"]?>"><?=$row["part_number"]?></a></td> <td><?=$row["product_name"]?></td> <td>$<?=$row["price"]?></td> <td><a href="[url=http://www.wlpsr.com/images/]http://www.wlpsr.com/images/[/url]"<?=$row["part_number"]?>".jpg " onClick="window.open('/images/<?=$row["part_number"]?>.jpg', '<?=$row["part_number"]?>', 'toolbar=yes, directories=no, location=no, status=yes, menubar=no, resizable=yes, scrollbars=yes, height=300, width=400'); return false">View</a></td> <td><form action="[url=http://www.nexpart.com/extpart.php?part=]http://www.nexpart.com/extpart.php?part=[/url]<?=$r["part_number"]?>&linecode=<?=$row["manufacturer"] ?>" method="GET"><input type="text" name="quantity" size="2" value="0" style="text-align:center;"> </form> </td> </tr> <? } } else{ ?> <tr> <td colspan=100 align="center"><b>No products in this category.</b></td> </tr> </table> <form action="[url=http://www.nexpart.com/extpart.php?part=]http://www.nexpart.com/extpart.php?part=[/url]<?=$r["part_number"]?>&linecode=<?=$row[" manufacturer"] ?>" method="GET"><input type="text" name="quantity" size="2" value="0" style="text-align: center;"><input type="button" name="submit_top" value="Check Out"> </form> </td> </tr> <? } ?> </td> </tr> </table> </div> <? } ?> <div class="form"> <form name="search" action="<? echo $_SERVER['PHP_SELF']; ?>" method="GET"> <input type="text" name="f_keywords" size="17" value="" maxlength="100"> <input type="image" src="gobutton.gif"> </form> </select> <br><br><br> <? $trimmed = trim(strip_tags($_GET["f_keywords"])); //Set the database access information as constants. if(strlen($trimmed) > 0){ define ('DB_USER', 'USERNAME'); define ('DB_PASSWORD', 'THEPASSWORD'); define ('DB_HOST', 'LOCALIP'); define ('DB_NAME', 'DBNAME'); define ('DB_TABLE', 'TABLE'); //Make the connection to the DB global $dbc; @dbConnect(); $query = "SELECT * FROM product WHERE manufacturer LIKE '%$trimmed%' OR part_number LIKE '%$trimmed%' OR price LIKE '%$trimmed%' OR product_name LIKE '%$trimmed%' order by manufacturer"; $result = mysql_query($query); $count = mysql_numrows($result); if ($trimmed == "") { echo "Please enter a search criteria..."; exit; } // check for a search parameter if (!isset($result)) { echo "<p>Please enter a search parameter!</p>"; exit; } $numresults=mysql_query($query); $numrows=mysql_num_rows($numresults); if ($numrows == 0) { echo "<h4>Results</h4>"; echo "<p>We are sorry <b>$trimmed</b> has returned zero results.</p></font>"; } // next determine if s has been passed to script, if not use 0 if (empty($s)) { $s=0; } // get results $result = mysql_query($query,$dbc); if($numrows < 1){ $return= "results";} else{ $return = "result"; } if($numrows > 1){ $return = "results";} else{ $return = "result"; } // display what the person searched for echo "Your search for ", " <b>$trimmed</b> ", " found <br><b>$numrows $return.</b>"; // begin to show results set $count = 1 + $s ; } if(strlen($trimmed) > 0){ ?> </div> <div class="search_results"> <table cellpadding=0 cellspacing=0 border=0> <tr> <td align="right"> <form action="[url=http://www.nexpart.com/extpart.php?part=]http://www.nexpart.com/extpart.php?part=[/url]<?=$r["part_number"]?>&linecode=<?=$row[" manufacturer"] ?>" method="GET"><input type="text" name="quantity" size="2" value="0" style="text-align: center;"><input type="button" name="submit_top" value="Check Out"> </td> </tr> <tr> <td> <table class="search_results_found" bgcolor="#efefef" cellpadding=3 cellspacing=0 border=1 bordercolor="#000000" style="border:1px solid #000000;"> <tr> <td width="100" class="search_results_title" align="center"> Manufacturer </td><td width="70" class="search_results_title" align="center"> Part Num. </td><td width="115" class=" search_results_title" align="center"> Description </td><td width="60" class="search_results_title" align="center">Price</td><td width="45" class=" search_results_title" align="center"> Image </td><td width="105" align="center"><b>Add to Cart</b> </td> </tr> </td> </tr> <? while ($r= mysql_fetch_array($result)) { $manufacturer = $r["manufacturer"]; $part_number = $r["part_number"]; $product_name = $r["product_name"]; $price = $r["price"]; $count++; echo "<tr><td>$manufacturer</td><td>"; echo "<a href=\"[url=http://www.nexpart.com/extpart.php?part=]http://www.nexpart.com/extpart.php?part=[/url]".$r["part_number"]."&linecode=".$r["manufacturer"]."\">".$r["part_number"]."</a></td><td>"; echo "$product_name</td><td>"; echo "$ $price</td><td>"; echo "<a href=\"[url=http://www.wlpsr.com/images/]http://www.wlpsr.com/images/[/url]".$r["part_number"].".jpg \" onClick=\"window.open('/images/".$r["part_number"].".jpg', '".$r["part_number"]."', 'toolbar=yes, directories=no, location=no, status=yes, menubar=no, resizable=yes, scrollbars=yes, height=300, width=400'); return false \">View</a></td><td>"; echo "<form action=\"[url=http://www.nexpart.com/extpart.php?part=]http://www.nexpart.com/extpart.php?part=[/url]".$r["part_number"]."&linecode=".$r["manufacturer"]."\" method=\"GET\"><input type=\"text\" name=\"quantity\" size=\"2\" value=\"0\" style=\"text-align:center;\"></td></tr>"; } ?> </table> <tr> <td align="right"> <form action="[url=http://www.nexpart.com/extpart.php?part=]http://www.nexpart.com/extpart.php?part=[/url]<?=$r["part_number"]?>&linecode=<?=$row[" manufacturer"] ?>" method="GET"><input type="text" name="quantity" size="2" value="0" style="text-align: center;"><input type="button" name="submit_bottom" value="Check Out"> </td> </tr> <? } ?> </table> <br><br> </div> <? @require("footer3.php"); ?> Mod edit: [code] . . . [/code] tags added. Hello there, I'm using a Mac (10.5. and installed MAMP for PHP and MYSQL I trying to build a blog. I just setup a database in phpmyadmin. I created a php and start coding, everything works just fine, but when I tried to connect to the mysql it gives me a blank page I inserted this code Code: [Select] <?php session_start(); $connect = mysql_connect('localhost','root', 'root'); or die(mysql_error()); $db = mysql_select_db('blog',$connect); $session_name = $_SESSION['uid']; ?> but then the whole page turns to be blank page , but when I excluded this, it works just fine. I don't get it cause my database/phpmyadmin connected just fine. Any help is much appreciated. Been trying to figure this out for hours. Hi, I knew the way to connect to mysql but i don't know how to connect mssql. Is it the same? here's an example for mysql. please teach me the mssql. $con = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME); $sql = "SELECT COUNT(*) FROM numbers"; $result = $con->query($sql); $r = $result->fetch_row(); thanks Hello, I've been having trouble connecting to a MySQL database, I can't find the problem in the code, what am I doing wrong? Getting the database file in the config file : require_once("db_connect.php"); db_connect.php : <?php $db = mysql_connect('83.172.155.14:3306', 'username', 'password') or die(mysql_error()); mysql_select_db('databasename', $db) or die(mysql_error()); ?> I need to connect to a PhpMyAdmin database. I need this fixed asap since I'm doing this for someone and he wants the site done as quickly as possible. P.S: The database used to work in php4 and now I need it to work on php5 Thanks in advance, I have created a function to connect to a required database with a username and password. I have called this db_openConnection() Now for each function that requires a select from a database is it ok just to call the db_OpenConnection() first within the function or should i be keeping open a db connection (using persist, i think) rather than keep creating a connection. I know that the connection ends when you have finished a query any how. Not sure if this is the correct forum or if it should be mysql forum I am trying to connect to my database on xammp, Im trying to find info how to connect and set up for people that sign in to my website they can regsiter for it.
Hello all, and apologies for taking your time up, but I am completely stuck!! Have been trying to create a PHP search code (6 weeks now) to return results from a mysql database (I am completely new to this, but okay with HTML). Most of the many attempts I have tried over the weeks have been learned/copied from the web, which resulted initially in connection errors (I hadn't set privileges up), and now I am in a place that that the Favicon spins and returns to original state - but does return:
else{ I am aware that the code may not be perfect, so I have tried downloading sample 'database and php files', and using them but they also dont work (but they do for others trying the sample). I have tried Stack Overflow forums, but they all seem very rude and patronising sadly, and still I havent managed to resolve it...so here I am! Here is a link to the page mentioned (search bar top right in question): https://flighteducation.co.uk/Careers Connect.php
And the php code: <?php session_start(); $output=NULL; if(isset($_POST['submit'])){ //Connect to the database $mysqli = new mysqli("localhost", "jj3wg2td_steven", "MYPASSWORD", "jj3wg2td_careerslist"); $search = $mysqli->real_escape_string($_POST['search']); //Query the database $result = $mysqli->query("SELECT * FROM careers WHERE Job Title LIKE '%$search%'"); if($result->num_rows > 0) { while($rows=$result->fetch_assoc()) { $jobTitle=$rows['Job Title']; $jobDesription=$rows['Job Description']; $salaryLow=$rows['Salary Low']; $salaryHigh=$rows['Salary High']; $output .="Job Title:$jobTitle<br /> Job Description:$jobDesription<br /> Salary Low:$salaryLow<br /> Salary High:$salaryHigh<br /> <br />"; } } else{ $output="No results"; } } ?> I have an output php further down the page, after my search setup OUTPUT:
<!--PHP OUTPUT-->
Search Button Code:
<!--SEARCH BOX-->
I cannot thank you enough for any support you can add as this is literally driving me mad, and wasting endless days (trying)
Kindest regards
Steven
Here's the whole PHP code, just in case I have something in there that clashes with it and a screen shot of the phpMYAdmin header database : <?php session_start(); $output=NULL; if(isset($_POST['submit'])){ //Connect to the database $mysqli = new mysqli("localhost", "jj3wg2td_steven", "MYPASSWORD", "jj3wg2td_careerslist"); $search = $mysqli->real_escape_string($_POST['search']); //Query the database $result = $mysqli->query("SELECT * FROM 'careers' WHERE Job Title LIKE '%$search%'"); if($result->num_rows > 0) { while($rows=$result->fetch_assoc()) { $jobTitle=$rows['Job Title']; $jobDesription=$rows['Job Description']; $salaryLow=$rows['Salary Low']; $salaryHigh=$rows['Salary High']; $output .="Job Title:$jobTitle<br /> Job Description:$jobDesription<br /> Salary Low:$salaryLow<br /> Salary High:$salaryHigh<br /> <br />"; } } else{ $output="No results"; } } ?> <!doctype html> <html> <head> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-170467250-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-170467250-1'); </script> <!--FAVICON--> <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"> <link rel="manifest" href="/site.webmanifest"> <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"> <!--FAVICON--> <meta name="msapplication-TileColor" content="#da532c"> <meta name="theme-color" content="#ffffff"> <meta name="msapplication-TileColor" content="#ffffff"> <meta name="msapplication-TileImage" content="/ms-icon-144x144.png"> <meta name="theme-color" content="#ffffff"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <meta charset="utf-8"> <title>- CAREERS -</title> <link href="Responsive.css" rel="stylesheet" type="text/css"> <style type="text/css"> a:link { color: rgba(255,255,255,1); } a:visited { color: rgba(255,255,255,1); } a:hover { color: rgba(243,219,7,1); } a:active { color: rgba(255,255,255,1); } /* scrollbar*/ body::-webkit-scrollbar { width: 6px; } body::-webkit-scrollbar-track { background: Black; } body::-webkit-scrollbar-thumb { background-color: rgba(243,219,7,1); border-radius: 20px; } /* scrollbar*/ </style> <script type="text/javascript"> function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } </script> </head> <body onLoad="MM_preloadImages('Top-LogoR.png')"> <!--TOP LOGO --> <div class="home-logo"> <a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image31','','Top-LogoR.png',1)"><img id="Image31" src="Top-Logo.png" alt="HOME"></a> </div> <div class="wrapper"> <!--Navigation --> <nav class="topnavbar-container"> <ul> <li><a href="#">COLLEGE /</a> <ul> <li><a href="#">SEARCH FOR A COLLEGE</a></li> <li><a href="#">GO TO COLLEGE</a></li> </ul> </li> <li><a href="#">UNIVERSITY /</a> <ul> <li><a href="#">SEARCH FOR A UNI</a></li> <li><a href="#">GO TO UNI</a></li> <li><a href="League Table.html">LEAGUE TABLES</a></li> <li><a href="Uni Life.html">LIFE IN UNI</a></li> </ul> </li> <li><a href="#">CAREERS</a> <ul> <li><a href="Careers Results.html">SEARCH CAREERS</a></li> <li><a href="index.html#CAREERS">BROWSE CAREERS</a></li> <li><a href="Set your Target.html">PLAN YOUR PATHWAY</a></li> <li><a href="Trending 2020.html">TRENDING IN 2020</a></li> </ul> </li> </ul> </nav> <!--SEARCH BOX--> <div class="search-box"> <form method="POST" id="search"> <input class="search-txt" type="TEXT" name="search" placeholder="SEARCH CAREERS"> <button class="search-btn" name="submit" type="submit"> <i class="fa fa-search" aria-hidden="true"></i> </button> </form> </div> <!--Top Container --> <section class="careers-results"> <header class="showcase-career"> <label for="Careers">Choose a Career:</label> <img src="img/Careers-Logo.png" alt="LOGO"> <br> <select class="careers-dropdown" name="Careers" id="Careers"> <option value=" 3D printing technician "> 3D printing technician </option> <option value=" Accommodation warden "> Accommodation warden </option> <option value=" Accounting technician "> Accounting technician </option> <option value=" Acoustics consultant "> Acoustics consultant </option> <option value=" Actor "> Actor </option> <option value=" Actuary "> Actuary </option> <option value=" Acupuncturist "> Acupuncturist </option> <option value=" Admin assistant "> Admin assistant </option> <option value=" Advertising account executive "> Advertising account executive </option> <option value=" Advertising account planner "> Advertising account planner </option> <option value=" Advertising art director "> Advertising art director </option> <option value=" Advertising copywriter "> Advertising copywriter </option> <option value=" Advertising media buyer "> Advertising media buyer </option> <option value=" Advertising media planner "> Advertising media planner </option> <option value=" Aerospace engineer "> Aerospace engineer </option> <option value=" Aerospace engineering technician "> Aerospace engineering technician </option> <option value=" Agricultural contractor "> Agricultural contractor </option> <option value=" Agricultural engineer "> Agricultural engineer </option> <option value=" Agricultural engineering technician "> Agricultural engineering technician </option> <option value=" Agricultural inspector "> Agricultural inspector </option> <option value=" Agronomist "> Agronomist </option> <option value=" Aid worker "> Aid worker </option> <option value=" Air accident investigator "> Air accident investigator </option> <option value=" Air traffic controller "> Air traffic controller </option> <option value=" Airline customer service agent "> Airline customer service agent </option> <option value=" Airline pilot "> Airline pilot </option> <option value=" Airport baggage handler "> Airport baggage handler </option> <option value=" Airport information assistant "> Airport information assistant </option> <option value=" Alexander Technique teacher "> Alexander Technique teacher </option> <option value=" Ambulance care assistant "> Ambulance care assistant </option> <option value=" Anaesthetist "> Anaesthetist </option> <option value=" Analytical textile technologist "> Analytical textile technologist </option> <option value=" Anatomical pathology technician "> Anatomical pathology technician </option> <option value=" Animal care worker "> Animal care worker </option> <option value=" Animal technician "> Animal technician </option> <option value=" Animator "> Animator </option> <option value=" Antique dealer "> Antique dealer </option> <option value=" App developer "> App developer </option> <option value=" Arboricultural officer "> Arboricultural officer </option> <option value=" Archaeologist "> Archaeologist </option> <option value=" Architect "> Architect </option> <option value=" Architectural technician "> Architectural technician </option> <option value=" Architectural technologist "> Architectural technologist </option> <option value=" Archivist "> Archivist </option> <option value=" Army officer "> Army officer </option> <option value=" Aromatherapist "> Aromatherapist </option> <option value=" Art editor "> Art editor </option> <option value=" Art gallery curator "> Art gallery curator </option> <option value=" Art therapist "> Art therapist </option> <option value=" Art valuer "> Art valuer </option> <option value=" Arts administrator "> Arts administrator </option> <option value=" Assistance dog trainer "> Assistance dog trainer </option> <option value=" Assistant immigration officer "> Assistant immigration officer </option> <option value=" Astronaut "> Astronaut </option> <option value=" Astronomer "> Astronomer </option> <option value=" Athlete "> Athlete </option> <option value=" Audiologist "> Audiologist </option> <option value=" Audio-visual technician "> Audio-visual technician </option> <option value=" Auditor "> Auditor </option> <option value=" Auto electrician "> Auto electrician </option> <option value=" Automotive engineer "> Automotive engineer </option> <option value=" Bailiff "> Bailiff </option> <option value=" Baker "> Baker </option> <option value=" Bank manager "> Bank manager </option> <option value=" Banking customer service adviser "> Banking customer service adviser </option> <option value=" Bar person "> Bar person </option> <option value=" Barber "> Barber </option> <option value=" Barista "> Barista </option> <option value=" Barrister "> Barrister </option> <option value=" Barristers' clerk "> Barristers' clerk </option> <option value=" Beauty consultant "> Beauty consultant </option> <option value=" Beauty therapist "> Beauty therapist </option> <option value=" Beekeeper "> Beekeeper </option> <option value=" Betting shop cashier "> Betting shop cashier </option> <option value=" Bid writer "> Bid writer </option> <option value=" Bilingual secretary "> Bilingual secretary </option> <option value=" Bin worker "> Bin worker </option> <option value=" Bingo caller "> Bingo caller </option> <option value=" Biochemist "> Biochemist </option> <option value=" Biologist "> Biologist </option> <option value=" Biomedical scientist "> Biomedical scientist </option> <option value=" Biotechnologist "> Biotechnologist </option> <option value=" Blacksmith "> Blacksmith </option> <option value=" Boat builder "> Boat builder </option> <option value=" Body piercer "> Body piercer </option> <option value=" Bodyguard "> Bodyguard </option> <option value=" Bomb disposal technician "> Bomb disposal technician </option> <option value=" Bookbinder "> Bookbinder </option> <option value=" Bookkeeper "> Bookkeeper </option> <option value=" Bookmaker "> Bookmaker </option> <option value=" Bookseller "> Bookseller </option> <option value=" Border Force officer "> Border Force officer </option> <option value=" Botanist "> Botanist </option> <option value=" Bottler "> Bottler </option> <option value=" Boxer "> Boxer </option> <option value=" Brewery worker "> Brewery worker </option> <option value=" Bricklayer "> Bricklayer </option> <option value=" British Sign Language interpreter "> British Sign Language interpreter </option> <option value=" British Sign Language teacher "> British Sign Language teacher </option> <option value=" Broadcast Engineer "> Broadcast Engineer </option> <option value=" Broadcast journalist "> Broadcast journalist </option> <option value=" Builders' merchant "> Builders' merchant </option> <option value=" Building control officer "> Building control officer </option> <option value=" Building services engineer "> Building services engineer </option> <option value=" Building site inspector "> Building site inspector </option> <option value=" Building surveyor "> Building surveyor </option> <option value=" Building technician "> Building technician </option> <option value=" Bus or coach driver "> Bus or coach driver </option> <option value=" Business adviser "> Business adviser </option> <option value=" Business analyst "> Business analyst </option> <option value=" Business development manager "> Business development manager </option> <option value=" Business project manager "> Business project manager </option> <option value=" Butcher "> Butcher </option> <option value=" Butler "> Butler </option> <option value=" Cabin crew "> Cabin crew </option> <option value=" CAD technician "> CAD technician </option> <option value=" Cake decorator "> Cake decorator </option> <option value=" Call centre operator "> Call centre operator </option> <option value=" Car manufacturing worker "> Car manufacturing worker </option> <option value=" Car rental agent "> Car rental agent </option> <option value=" Car valet "> Car valet </option> <option value=" Care escort "> Care escort </option> <option value=" Care home advocate "> Care home advocate </option> <option value=" Care home manager "> Care home manager </option> <option value=" Care worker "> Care worker </option> <option value=" Careers adviser "> Careers adviser </option> <option value=" Caretaker "> Caretaker </option> <option value=" Carpenter "> Carpenter </option> <option value=" Carpet fitter and floor layer "> Carpet fitter and floor layer </option> <option value=" Cartographer "> Cartographer </option> <option value=" Catering manager "> Catering manager </option> <option value=" Cavity insulation installer "> Cavity insulation installer </option> <option value=" Ceiling fixer "> Ceiling fixer </option> <option value=" Celebrant "> Celebrant </option> <option value=" Cellar technician "> Cellar technician </option> <option value=" Cemetery worker "> Cemetery worker </option> <option value=" Ceramics designer-maker "> Ceramics designer-maker </option> <option value=" Charity director "> Charity director </option> <option value=" Charity fundraiser "> Charity fundraiser </option> <option value=" Chauffeur "> Chauffeur </option> <option value=" Checkout operator "> Checkout operator </option> <option value=" Chef "> Chef </option> <option value=" Chemical engineer "> Chemical engineer </option> <option value=" Chemical engineering technician "> Chemical engineering technician </option> <option value=" Chemical plant process operator "> Chemical plant process operator </option> <option value=" Chemist "> Chemist </option> <option value=" Chief executive "> Chief executive </option> <option value=" Chief inspector "> Chief inspector </option> <option value=" Child protection officer "> Child protection officer </option> <option value=" Childminder "> Childminder </option> <option value=" Children's nurse "> Children's nurse </option> <option value=" Chimney sweep "> Chimney sweep </option> <option value=" Chiropractor "> Chiropractor </option> <option value=" Choreographer "> Choreographer </option> <option value=" Cinema or theatre attendant "> Cinema or theatre attendant </option> <option value=" Cinema projectionist "> Cinema projectionist </option> <option value=" Circus performer "> Circus performer </option> <option value=" Civil enforcement officer "> Civil enforcement officer </option> <option value=" Civil engineer "> Civil engineer </option> <option value=" Civil engineering technician "> Civil engineering technician </option> <option value=" Civil Service administrative officer "> Civil Service administrative officer </option> <option value=" Civil Service executive officer "> Civil Service executive officer </option> <option value=" Civil Service manager "> Civil Service manager </option> <option value=" Classical musician "> Classical musician </option> <option value=" Cleaner "> Cleaner </option> <option value=" Climate scientist "> Climate scientist </option> <option value=" Clinical engineer "> Clinical engineer </option> <option value=" Clinical psychologist "> Clinical psychologist </option> <option value=" Clinical scientist "> Clinical scientist </option> <option value=" CNC machinist "> CNC machinist </option> <option value=" Coastguard "> Coastguard </option> <option value=" Cognitive behavioural therapist "> Cognitive behavioural therapist </option> <option value=" Colon hydrotherapist "> Colon hydrotherapist </option> <option value=" Colour therapist "> Colour therapist </option> <option value=" Commercial energy assessor "> Commercial energy assessor </option> <option value=" Commissioning editor "> Commissioning editor </option> <option value=" Communication support worker "> Communication support worker </option> <option value=" Community arts worker "> Community arts worker </option> <option value=" Community development worker "> Community development worker </option> <option value=" Community education co-ordinator "> Community education co-ordinator </option> <option value=" Community matron "> Community matron </option> <option value=" Community transport driver "> Community transport driver </option> <option value=" Company secretary "> Company secretary </option> <option value=" Computer games developer "> Computer games developer </option> <option value=" Computer games tester "> Computer games tester </option> <option value=" Conference and exhibition manager "> Conference and exhibition manager </option> <option value=" Conservator "> Conservator </option> <option value=" Construction contracts manager "> Construction contracts manager </option> <option value=" Construction labourer "> Construction labourer </option> <option value=" Construction manager "> Construction manager </option> <option value=" Construction plant hire adviser "> Construction plant hire adviser </option> <option value=" Construction plant mechanic "> Construction plant mechanic </option> <option value=" Construction plant operator "> Construction plant operator </option> <option value=" Construction site supervisor "> Construction site supervisor </option> <option value=" Consumer scientist "> Consumer scientist </option> <option value=" Copy editor "> Copy editor </option> <option value=" Coroner "> Coroner </option> <option value=" Cosmetic surgeon "> Cosmetic surgeon </option> <option value=" Costume designer "> Costume designer </option> <option value=" Counsellor "> Counsellor </option> <option value=" Counter service assistant "> Counter service assistant </option> <option value=" Countryside officer "> Countryside officer </option> <option value=" Countryside ranger "> Countryside ranger </option> <option value=" Courier "> Courier </option> <option value=" Court administrative assistant "> Court administrative assistant </option> <option value=" Court legal adviser "> Court legal adviser </option> <option value=" Court usher "> Court usher </option> <option value=" Crane driver "> Crane driver </option> <option value=" Credit controller "> Credit controller </option> <option value=" Credit manager "> Credit manager </option> <option value=" Crematorium technician "> Crematorium technician </option> <option value=" Cricketer "> Cricketer </option> <option value=" Criminal intelligence analyst "> Criminal intelligence analyst </option> <option value=" Criminologist "> Criminologist </option> <option value=" Critical care technologist "> Critical care technologist </option> <option value=" Croupier "> Croupier </option> <option value=" Crown prosecutor "> Crown prosecutor </option> <option value=" Cruise ship steward "> Cruise ship steward </option> <option value=" Customer service assistant "> Customer service assistant </option> <option value=" Customer services manager "> Customer services manager </option> <option value=" Cyber intelligence officer "> Cyber intelligence officer </option> <option value=" Cycle mechanic "> Cycle mechanic </option> <option value=" Cycling coach "> Cycling coach </option> <option value=" Dance movement psychotherapist "> Dance movement psychotherapist </option> <option value=" Dance teacher "> Dance teacher </option> <option value=" Dancer "> Dancer </option> <option value=" Data analyst-statistician "> Data analyst-statistician </option> <option value=" Data entry clerk "> Data entry clerk </option> <option value=" Database administrator "> Database administrator </option> <option value=" Delivery van driver "> Delivery van driver </option> <option value=" Demolition operative "> Demolition operative </option> <option value=" Dental hygienist "> Dental hygienist </option> <option value=" Dental nurse "> Dental nurse </option> <option value=" Dental technician "> Dental technician </option> <option value=" Dental therapist "> Dental therapist </option> <option value=" Dentist "> Dentist </option> <option value=" Design and development engineer "> Design and development engineer </option> <option value=" Dietitian "> Dietitian </option> <option value=" Digital delivery manager "> Digital delivery manager </option> <option value=" Digital marketer "> Digital marketer </option> <option value=" Digital product owner "> Digital product owner </option> <option value=" Diplomatic Service officer "> Diplomatic Service officer </option> <option value=" Director of photography "> Director of photography </option> <option value=" Dispensing optician "> Dispensing optician </option> <option value=" District nurse "> District nurse </option> <option value=" Diver "> Diver </option> <option value=" DJ "> DJ </option> <option value=" Dog groomer "> Dog groomer </option> <option value=" Dog handler "> Dog handler </option> <option value=" Domestic appliance service engineer "> Domestic appliance service engineer </option> <option value=" Domestic energy assessor "> Domestic energy assessor </option> <option value=" Door supervisor "> Door supervisor </option> <option value=" Dramatherapist "> Dramatherapist </option> <option value=" Dressmaker "> Dressmaker </option> <option value=" Driving instructor "> Driving instructor </option> <option value=" Drone pilot "> Drone pilot </option> <option value=" Drug and alcohol worker "> Drug and alcohol worker </option> <option value=" Dry cleaner "> Dry cleaner </option> <option value=" Dry liner "> Dry liner </option> <option value=" Early years teacher "> Early years teacher </option> <option value=" Ecologist "> Ecologist </option> <option value=" E-commerce manager "> E-commerce manager </option> <option value=" Economic development officer "> Economic development officer </option> <option value=" Economist "> Economist </option> <option value=" Editorial assistant "> Editorial assistant </option> <option value=" Education technician "> Education technician </option> <option value=" Education welfare officer "> Education welfare officer </option> <option value=" E-learning developer "> E-learning developer </option> <option value=" Electrical engineer "> Electrical engineer </option> <option value=" Electrical engineering technician "> Electrical engineering technician </option> <option value=" Electrician "> Electrician </option> <option value=" Electricity distribution worker "> Electricity distribution worker </option> <option value=" Electricity generation worker "> Electricity generation worker </option> <option value=" Electronics engineer "> Electronics engineer </option> <option value=" Electronics engineering technician "> Electronics engineering technician </option> <option value=" Embalmer "> Embalmer </option> <option value=" Emergency care assistant "> Emergency care assistant </option> <option value=" Emergency medical dispatcher "> Emergency medical dispatcher </option> <option value=" Energy engineer "> Energy engineer </option> <option value=" Engineering construction craftworker "> Engineering construction craftworker </option> <option value=" Engineering construction technician "> Engineering construction technician </option> <option value=" Engineering craft machinist "> Engineering craft machinist </option> <option value=" Engineering maintenance technician "> Engineering maintenance technician </option> <option value=" Engineering operative "> Engineering operative </option> <option value=" English as a foreign language (EFL) teacher "> English as a foreign language (EFL) teacher </option> <option value=" Entertainer "> Entertainer </option> <option value=" Entertainment agent "> Entertainment agent </option> <option value=" Environmental consultant "> Environmental consultant </option> <option value=" Environmental health officer "> Environmental health officer </option> <option value=" Equalities officer "> Equalities officer </option> <option value=" Ergonomist "> Ergonomist </option> <option value=" Estate agent "> Estate agent </option> <option value=" Estates officer "> Estates officer </option> <option value=" Estimator "> Estimator </option> <option value=" European Union official "> European Union official </option> <option value=" Events manager "> Events manager </option> <option value=" Exhibition designer "> Exhibition designer </option> <option value=" Facilities manager "> Facilities manager </option> <option value=" Fairground worker "> Fairground worker </option> <option value=" Family mediator "> Family mediator </option> <option value=" Family support worker "> Family support worker </option> <option value=" Farm secretary "> Farm secretary </option> <option value=" Farm worker "> Farm worker </option> <option value=" Farmer "> Farmer </option> <option value=" Farrier "> Farrier </option> <option value=" Fashion design assistant "> Fashion design assistant </option> <option value=" Fashion designer "> Fashion designer </option> <option value=" Fashion model "> Fashion model </option> <option value=" Fence installer "> Fence installer </option> <option value=" Film critic "> Film critic </option> <option value=" Finance officer "> Finance officer </option> <option value=" Financial adviser "> Financial adviser </option> <option value=" Financial services customer adviser "> Financial services customer adviser </option> <option value=" Fine artist "> Fine artist </option> <option value=" Fingerprint officer "> Fingerprint officer </option> <option value=" Firefighter "> Firefighter </option> <option value=" Fish farmer "> Fish farmer </option> <option value=" Fish frier "> Fish frier </option> <option value=" Fishing boat deckhand "> Fishing boat deckhand </option> <option value=" Fishing vessel skipper "> Fishing vessel skipper </option> <option value=" Fishmonger "> Fishmonger </option> <option value=" Fitness instructor "> Fitness instructor </option> <option value=" Florist "> Florist </option> <option value=" Food factory worker "> Food factory worker </option> <option value=" Food manufacturing inspector "> Food manufacturing inspector </option> <option value=" Food packaging operative "> Food packaging operative </option> <option value=" Food scientist "> Food scientist </option> <option value=" Football coach "> Football coach </option> <option value=" Football referee "> Football referee </option> <option value=" Footballer "> Footballer </option> <option value=" Footwear designer "> Footwear designer </option> <option value=" Footwear manufacturing operative "> Footwear manufacturing operative </option> <option value=" Forensic computer analyst "> Forensic computer analyst </option> <option value=" Forensic psychologist "> Forensic psychologist </option> <option value=" Forensic scientist "> Forensic scientist </option> <option value=" Forest officer "> Forest officer </option> <option value=" Forestry worker "> Forestry worker </option> <option value=" Forklift driver "> Forklift driver </option> <option value=" Forklift truck engineer "> Forklift truck engineer </option> <option value=" Foster carer "> Foster carer </option> <option value=" Foundry mould maker "> Foundry mould maker </option> <option value=" Foundry process operator "> Foundry process operator </option> <option value=" Franchise owner "> Franchise owner </option> <option value=" French polisher "> French polisher </option> <option value=" Funeral director "> Funeral director </option> <option value=" Furniture designer "> Furniture designer </option> <option value=" Furniture maker "> Furniture maker </option> <option value=" Furniture restorer "> Furniture restorer </option> <option value=" Further education lecturer "> Further education lecturer </option> <option value=" Gamekeeper "> Gamekeeper </option> <option value=" Garage manager "> Garage manager </option> <option value=" Garden nursery assistant "> Garden nursery assistant </option> <option value=" Gardener "> Gardener </option> <option value=" Garment technologist "> Garment technologist </option> <option value=" Gas mains layer "> Gas mains layer </option> <option value=" Gas service technician "> Gas service technician </option> <option value=" General practice surveyor "> General practice surveyor </option> <option value=" Geneticist "> Geneticist </option> <option value=" Geoscientist "> Geoscientist </option> <option value=" Geospatial technician "> Geospatial technician </option> <option value=" Geotechnician "> Geotechnician </option> <option value=" Glassmaker "> Glassmaker </option> <option value=" Glazier "> Glazier </option> <option value=" GP "> GP </option> <option value=" GP practice manager "> GP practice manager </option> <option value=" Graphic designer "> Graphic designer </option> <option value=" Groundsperson "> Groundsperson </option> <option value=" Hairdresser "> Hairdresser </option> <option value=" Hairdressing salon manager "> Hairdressing salon manager </option> <option value=" Handyperson "> Handyperson </option> <option value=" Head chef "> Head chef </option> <option value=" Head of IT (IT director) "> Head of IT (IT director) </option> <option value=" Headteacher "> Headteacher </option> <option value=" Health and safety adviser "> Health and safety adviser </option> <option value=" Health play specialist "> Health play specialist </option> <option value=" Health promotion specialist "> Health promotion specialist </option> <option value=" Health records clerk "> Health records clerk </option> <option value=" Health service manager "> Health service manager </option> <option value=" Health trainer "> Health trainer </option> <option value=" Health visitor "> Health visitor </option> <option value=" Healthcare assistant "> Healthcare assistant </option> <option value=" Healthcare science assistant "> Healthcare science assistant </option> <option value=" Heating and ventilation engineer "> Heating and ventilation engineer </option> <option value=" Helicopter engineer "> Helicopter engineer </option> <option value=" Helicopter pilot "> Helicopter pilot </option> <option value=" Heritage officer "> Heritage officer </option> <option value=" Higher education lecturer "> Higher education lecturer </option> <option value=" Highways cleaner "> Highways cleaner </option> <option value=" Homeopath "> Homeopath </option> <option value=" Horse groom "> Horse groom </option> <option value=" Horse riding instructor "> Horse riding instructor </option> <option value=" Horticultural manager "> Horticultural manager </option> <option value=" Horticultural therapist "> Horticultural therapist </option> <option value=" Horticultural worker "> Horticultural worker </option> <option value=" Hospital doctor "> Hospital doctor </option> <option value=" Hospital porter "> Hospital porter </option> <option value=" Hotel manager "> Hotel manager </option> <option value=" Hotel porter "> Hotel porter </option> <option value=" Hotel receptionist "> Hotel receptionist </option> <option value=" Hotel room attendant "> Hotel room attendant </option> <option value=" Housekeeper "> Housekeeper </option> <option value=" Housing officer "> Housing officer </option> <option value=" Housing policy officer "> Housing policy officer </option> <option value=" Human resources assistant "> Human resources assistant </option> <option value=" Human resources manager "> Human resources manager </option> <option value=" Human resources officer "> Human resources officer </option> <option value=" Hydrologist "> Hydrologist </option> <option value=" Hypnotherapist "> Hypnotherapist </option> <option value=" Illustrator "> Illustrator </option> <option value=" Image consultant "> Image consultant </option> <option value=" Immigration adviser (non-government) "> Immigration adviser (non-government) </option> <option value=" Immigration officer "> Immigration officer </option> <option value=" Import-export clerk "> Import-export clerk </option> <option value=" Indexer "> Indexer </option> <option value=" Industrial cleaner "> Industrial cleaner </option> <option value=" Information scientist "> Information scientist </option> <option value=" Insurance account manager "> Insurance account manager </option> <option value=" Insurance broker "> Insurance broker </option> <option value=" Insurance claims handler "> Insurance claims handler </option> <option value=" Insurance loss adjuster "> Insurance loss adjuster </option> <option value=" Insurance risk surveyor "> Insurance risk surveyor </option> <option value=" Insurance technician "> Insurance technician </option> <option value=" Insurance underwriter "> Insurance underwriter </option> <option value=" Interior designer "> Interior designer </option> <option value=" Interpreter "> Interpreter </option> <option value=" Investment analyst "> Investment analyst </option> <option value=" IT project manager "> IT project manager </option> <option value=" IT security co-ordinator "> IT security co-ordinator </option> <option value=" IT service engineer "> IT service engineer </option> <option value=" IT support technician "> IT support technician </option> <option value=" IT trainer "> IT trainer </option> <option value=" Jewellery designer-maker "> Jewellery designer-maker </option> <option value=" Jockey "> Jockey </option> <option value=" Judge "> Judge </option> <option value=" Kennel worker "> Kennel worker </option> <option value=" Kitchen and bathroom fitter "> Kitchen and bathroom fitter </option> <option value=" Kitchen assistant "> Kitchen assistant </option> <option value=" Kitchen porter "> Kitchen porter </option> <option value=" Knitter "> Knitter </option> <option value=" Laboratory technician "> Laboratory technician </option> <option value=" Land and property valuer and auctioneer "> Land and property valuer and auctioneer </option> <option value=" Land surveyor "> Land surveyor </option> <option value=" Landscape architect "> Landscape architect </option> <option value=" Landscaper "> Landscaper </option> <option value=" Large goods vehicle driver "> Large goods vehicle driver </option> <option value=" Laundry worker "> Laundry worker </option> <option value=" Learning disability nurse "> Learning disability nurse </option> <option value=" Learning mentor "> Learning mentor </option> <option value=" Leather craftworker "> Leather craftworker </option> <option value=" Leather technologist "> Leather technologist </option> <option value=" Legal executive "> Legal executive </option> <option value=" Legal secretary "> Legal secretary </option> <option value=" Leisure centre assistant "> Leisure centre assistant </option> <option value=" Leisure centre manager "> Leisure centre manager </option> <option value=" Letting agent "> Letting agent </option> <option value=" Librarian "> Librarian </option> <option value=" Library assistant "> Library assistant </option> <option value=" Licensed conveyancer "> Licensed conveyancer </option> <option value=" Life coach "> Life coach </option> <option value=" Lifeguard "> Lifeguard </option> <option value=" Lift engineer "> Lift engineer </option> <option value=" Lighting technician "> Lighting technician </option> <option value=" Live sound engineer "> Live sound engineer </option> <option value=" Local government administrative assistant "> Local government administrative assistant </option> <option value=" Local government officer "> Local government officer </option> <option value=" Local government revenues officer "> Local government revenues officer </option> <option value=" Lock keeper "> Lock keeper </option> <option value=" Locksmith "> Locksmith </option> <option value=" Magazine journalist "> Magazine journalist </option> <option value=" Magistrate "> Magistrate </option> <option value=" Maintenance fitter "> Maintenance fitter </option> <option value=" Make-up artist "> Make-up artist </option> <option value=" Management accountant "> Management accountant </option> <option value=" Management consultant "> Management consultant </option> <option value=" Manufacturing supervisor "> Manufacturing supervisor </option> <option value=" Manufacturing systems engineer "> Manufacturing systems engineer </option> <option value=" Marine engineer "> Marine engineer </option> <option value=" Marine engineering technician "> Marine engineering technician </option> <option value=" Market research data analyst "> Market research data analyst </option> <option value=" Market research executive "> Market research executive </option> <option value=" Market researcher "> Market researcher </option> <option value=" Market trader "> Market trader </option> <option value=" Marketing director "> Marketing director </option> <option value=" Marketing executive "> Marketing executive </option> <option value=" Marketing manager "> Marketing manager </option> <option value=" Martial arts instructor "> Martial arts instructor </option> <option value=" Massage therapist "> Massage therapist </option> <option value=" Materials engineer "> Materials engineer </option> <option value=" Materials technician "> Materials technician </option> <option value=" Maternity support worker "> Maternity support worker </option> <option value=" Meat hygiene inspector "> Meat hygiene inspector </option> <option value=" Meat process worker "> Meat process worker </option> <option value=" Mechanical engineer "> Mechanical engineer </option> <option value=" Mechanical engineering technician "> Mechanical engineering technician </option> <option value=" Media researcher "> Media researcher </option> <option value=" Medical herbalist "> Medical herbalist </option> <option value=" Medical illustrator "> Medical illustrator </option> <option value=" Medical physicist "> Medical physicist </option> <option value=" Medical sales representative "> Medical sales representative </option> <option value=" Medical secretary "> Medical secretary </option> <option value=" Mental health nurse "> Mental health nurse </option> <option value=" Merchant Navy deck officer "> Merchant Navy deck officer </option> <option value=" Merchant Navy engineering officer "> Merchant Navy engineering officer </option> <option value=" Merchant Navy rating "> Merchant Navy rating </option> <option value=" Meteorologist "> Meteorologist </option> <option value=" Metrologist "> Metrologist </option> <option value=" Microbiologist "> Microbiologist </option> <option value=" Microbrewer "> Microbrewer </option> <option value=" Midwife "> Midwife </option> <option value=" Model maker "> Model maker </option> <option value=" Money adviser "> Money adviser </option> <option value=" Montessori teacher "> Montessori teacher </option> <option value=" Mortgage adviser "> Mortgage adviser </option> <option value=" Motor mechanic "> Motor mechanic </option> <option value=" Motor vehicle breakdown engineer "> Motor vehicle breakdown engineer </option> <option value=" Motor vehicle fitter "> Motor vehicle fitter </option> <option value=" Motor vehicle parts person "> Motor vehicle parts person </option> <option value=" Motorcycle mechanic "> Motorcycle mechanic </option> <option value=" Motorsport engineer "> Motorsport engineer </option> <option value=" MP "> MP </option> <option value=" Museum assistant "> Museum assistant </option> <option value=" Museum curator "> Museum curator </option> <option value=" Music promotions manager "> Music promotions manager </option> <option value=" Music teacher "> Music teacher </option> <option value=" Music therapist "> Music therapist </option> <option value=" Musical instrument maker and repairer "> Musical instrument maker and repairer </option> <option value=" Nail technician "> Nail technician </option> <option value=" Nanny "> Nanny </option> <option value=" Nanotechnologist "> Nanotechnologist </option> <option value=" Naturopath "> Naturopath </option> <option value=" Naval architect "> Naval architect </option> <option value=" Neighbourhood warden "> Neighbourhood warden </option> <option value=" Network engineer "> Network engineer </option> <option value=" Network manager "> Network manager </option> <option value=" Newspaper journalist "> Newspaper journalist </option> <option value=" Newspaper or magazine editor "> Newspaper or magazine editor </option> <option value=" Non-destructive testing technician "> Non-destructive testing technician </option> <option value=" Nuclear engineer "> Nuclear engineer </option> <option value=" Nuclear technician "> Nuclear technician </option> <option value=" Nurse "> Nurse </option> <option value=" Nursery manager "> Nursery manager </option> <option value=" Nursery worker "> Nursery worker </option> <option value=" Nursing associate "> Nursing associate </option> <option value=" Nutritional therapist "> Nutritional therapist </option> <option value=" Nutritionist "> Nutritionist </option> <option value=" Occupational health nurse "> Occupational health nurse </option> <option value=" Occupational therapist "> Occupational therapist </option> <option value=" Occupational therapy support worker "> Occupational therapy support worker </option> <option value=" Oceanographer "> Oceanographer </option> <option value=" Office manager "> Office manager </option> <option value=" Offshore drilling worker "> Offshore drilling worker </option> <option value=" Ofsted inspector "> Ofsted inspector </option> <option value=" Oil and gas operations manager "> Oil and gas operations manager </option> <option value=" Online tutor "> Online tutor </option> <option value=" Operating department practitioner "> Operating department practitioner </option> <option value=" Operational researcher "> Operational researcher </option> <option value=" Optometrist "> Optometrist </option> <option value=" Order picker "> Order picker </option> <option value=" Ornithologist "> Ornithologist </option> <option value=" Orthoptist "> Orthoptist </option> <option value=" Osteopath "> Osteopath </option> <option value=" Outdoor activities instructor "> Outdoor activities instructor </option> <option value=" Packaging technologist "> Packaging technologist </option> <option value=" Packer "> Packer </option> <option value=" Paediatrician "> Paediatrician </option> <option value=" Paint sprayer "> Paint sprayer </option> <option value=" Painter and decorator "> Painter and decorator </option> <option value=" Palaeontologist "> Palaeontologist </option> <option value=" Palliative care assistant "> Palliative care assistant </option> <option value=" Paper maker "> Paper maker </option> <option value=" Paralegal "> Paralegal </option> <option value=" Paramedic "> Paramedic </option> <option value=" Patent attorney "> Patent attorney </option> <option value=" Pathologist "> Pathologist </option> <option value=" Patient advice and liaison service officer "> Patient advice and liaison service officer </option> <option value=" Patient transport service controller "> Patient transport service controller </option> <option value=" Pattern cutter "> Pattern cutter </option> <option value=" Payroll administrator "> Payroll administrator </option> <option value=" Payroll manager "> Payroll manager </option> <option value=" PE teacher "> PE teacher </option> <option value=" Pensions administrator "> Pensions administrator </option> <option value=" Pensions adviser "> Pensions adviser </option> <option value=" Personal assistant "> Personal assistant </option> <option value=" Personal shopper "> Personal shopper </option> <option value=" Personal trainer "> Personal trainer </option> <option value=" Pest control technician "> Pest control technician </option> <option value=" Pet behaviour counsellor "> Pet behaviour counsellor </option> <option value=" Pet shop assistant "> Pet shop assistant </option> <option value=" Petrol station sales assistant "> Petrol station sales assistant </option> <option value=" Pharmacist "> Pharmacist </option> <option value=" Pharmacologist "> Pharmacologist </option> <option value=" Pharmacy assistant "> Pharmacy assistant </option> <option value=" Pharmacy technician "> Pharmacy technician </option> <option value=" Phlebotomist "> Phlebotomist </option> <option value=" Photographer "> Photographer </option> <option value=" Photographic stylist "> Photographic stylist </option> <option value=" Photographic technician "> Photographic technician </option> <option value=" Physician associate "> Physician associate </option> <option value=" Physicist "> Physicist </option> <option value=" Physiotherapist "> Physiotherapist </option> <option value=" Physiotherapy assistant "> Physiotherapy assistant </option> <option value=" Picture framer "> Picture framer </option> <option value=" Pilates teacher "> Pilates teacher </option> <option value=" Pipe fitter "> Pipe fitter </option> <option value=" Planning and development surveyor "> Planning and development surveyor </option> <option value=" Plasterer "> Plasterer </option> <option value=" Play therapist "> Play therapist </option> <option value=" Playworker "> Playworker </option> <option value=" Plumber "> Plumber </option> <option value=" Podiatrist "> Podiatrist </option> <option value=" Podiatry assistant "> Podiatry assistant </option> <option value=" Police community support officer "> Police community support officer </option> <option value=" Police officer "> Police officer </option> <option value=" Pop musician "> Pop musician </option> <option value=" Port operative "> Port operative </option> <option value=" Portage home visitor "> Portage home visitor </option> <option value=" Post Office customer service assistant "> Post Office customer service assistant </option> <option value=" Postman or postwoman "> Postman or postwoman </option> <option value=" Practice nurse "> Practice nurse </option> <option value=" Pre-press operator "> Pre-press operator </option> <option value=" Primary care graduate mental health worker "> Primary care graduate mental health worker </option> <option value=" Primary school teacher "> Primary school teacher </option> <option value=" Prison governor "> Prison governor </option> <option value=" Prison instructor "> Prison instructor </option> <option value=" Prison officer "> Prison officer </option> <option value=" Private investigator "> Private investigator </option> <option value=" Private practice accountant "> Private practice accountant </option> <option value=" Probation officer "> Probation officer </option> <option value=" Probation services officer "> Probation services officer </option> <option value=" Product designer "> Product designer </option> <option value=" Production manager (manufacturing) "> Production manager (manufacturing) </option> <option value=" Production worker (manufacturing) "> Production worker (manufacturing) </option> <option value=" Proofreader "> Proofreader </option> <option value=" Prop maker "> Prop maker </option> <option value=" Prosthetist-orthotist "> Prosthetist-orthotist </option> <option value=" Psychiatrist "> Psychiatrist </option> <option value=" Psychologist "> Psychologist </option> <option value=" Psychotherapist "> Psychotherapist </option> <option value=" Public finance accountant "> Public finance accountant </option> <option value=" Public relations director "> Public relations director </option> <option value=" Public relations officer "> Public relations officer </option> <option value=" Publican "> Publican </option> <option value=" Purchasing manager "> Purchasing manager </option> <option value=" QCF assessor "> QCF assessor </option> <option value=" Quality assurance manager "> Quality assurance manager </option> <option value=" Quality control assistant "> Quality control assistant </option> <option value=" Quantity surveyor "> Quantity surveyor </option> <option value=" Quarry engineer "> Quarry engineer </option> <option value=" Quarry worker "> Quarry worker </option> <option value=" Racehorse trainer "> Racehorse trainer </option> <option value=" Radio broadcast assistant "> Radio broadcast assistant </option> <option value=" Radiographer "> Radiographer </option> <option value=" Radiography assistant "> Radiography assistant </option> <option value=" RAF airman or airwoman "> RAF airman or airwoman </option> <option value=" RAF non-commissioned aircrew "> RAF non-commissioned aircrew </option> <option value=" RAF officer "> RAF officer </option> <option value=" Rail engineering technician "> Rail engineering technician </option> <option value=" Rail track maintenance worker "> Rail track maintenance worker </option> <option value=" Railway signaller "> Railway signaller </option> <option value=" Receptionist "> Receptionist </option> <option value=" Recruitment consultant "> Recruitment consultant </option> <option value=" Recycled metals worker "> Recycled metals worker </option> <option value=" Recycling officer "> Recycling officer </option> <option value=" Recycling operative "> Recycling operative </option> <option value=" Reflexologist "> Reflexologist </option> <option value=" Refrigeration and air-conditioning installer "> Refrigeration and air-conditioning installer </option> <option value=" Registrar of births, deaths, marriages and civil partnerships "> Registrar of births, deaths, marriages and civil partnerships </option> <option value=" Reiki healer "> Reiki healer </option> <option value=" Religious leader "> Religious leader </option> <option value=" Removals worker "> Removals worker </option> <option value=" Reprographic assistant "> Reprographic assistant </option> <option value=" Research and development manager "> Research and development manager </option> <option value=" Research scientist "> Research scientist </option> <option value=" Residential support worker "> Residential support worker </option> <option value=" Resort representative "> Resort representative </option> <option value=" Restaurant manager "> Restaurant manager </option> <option value=" Retail buyer "> Retail buyer </option> <option value=" Retail jeweller "> Retail jeweller </option> <option value=" Retail manager "> Retail manager </option> <option value=" Retail merchandiser "> Retail merchandiser </option> <option value=" Riding holiday centre manager "> Riding holiday centre manager </option> <option value=" Riding holiday leader "> Riding holiday leader </option> <option value=" Road traffic accident investigator "> Road traffic accident investigator </option> <option value=" Road transport manager "> Road transport manager </option> <option value=" Road worker "> Road worker </option> <option value=" Roadie "> Roadie </option> <option value=" Robotics engineer "> Robotics engineer </option> <option value=" Roofer "> Roofer </option> <option value=" Roustabout "> Roustabout </option> <option value=" Royal Marines commando "> Royal Marine I have a script that is trying to connect from one server to another and it doesn't seem to let it. Could someone help me please Code: [Select] Can't connect to MySQL server on 'example.com' (4) Hi, I cant connect to my Mysql database. I get this problem: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'esolarch_databas'@'localhost' (using password: YES) in /home7/esolarch/public_html/new/storescripts/connect_to_mysql.php on line 21 could not connect to mysql Code: [Select] <?php /* 1: "die()" will exit the script and show an error statement if something goes wrong with the "connect" or "select" functions. 2: A "mysql_connect()" error usually means your username/password are wrong 3: A "mysql_select_db()" error usually means the database does not exist. */ // Place db host name. Sometimes "localhost" but // sometimes looks like this: >> ???mysql??.someserver.net $db_host = "localhost"; // Place the username for the MySQL database here $db_username = "esolarch_database"; // Place the password for the MySQL database here $db_pass = "Password"; // Place the name for the MySQL database here $db_name = "esolarch_admin2"; // Run the actual connection here mysql_connect("$db_host","$db_username","$db_pass") or die ("could not connect to mysql"); mysql_select_db("$db_name") or die ("no database"); ?> Hi, When i am trying to run one script on my web server, i get following error Cannot connect to the database using the info you provided Access denied for user 'My_Username'@'localhost' (using password: NO) I filled all info like Host(localhost) Database name(created in cpanel) Username(created in cpanel) Password(i kept blank dont know where to find this) You help will highly appreciate Thanks, Ravindra Hi everyone! I am building an application in PHP with MySQL on my localhost. I tried to connect to the database like this: mysql_connect("localhost", "root", "password"); mysql_select_db("app-db"); but the message I get is: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'user'@'localhost' (using password: NO) in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\app\Source\includes\db_connect.php on line 3 Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\app\Source\includes\db_connect.php on line 4 Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\app\Source\includes\db_connect.php on line 4 I never wrote user 'user' in the whole application but root and even when I comment out that line of mysql_connect, the first error doesn't go away. The url of the index of the application is localhost/app/Source/index.php When I make a page: localhost/index2.php with the same content as my db_connec file then there is no error. When I move or copy the db_connect file to localhost/db_connect.php it also gives me those warnings. Also, when I change things in the code, PHP does not recognize them and nothing changes - meaning, that I can comment out those connect statements and still get the warnings. Can anyone offer me some advice and help me solve this, please? Thanks in advance! MiRed This topic has been moved to PHP Installation & Configuration. http://www.phpfreaks.com/forums/index.php?topic=355401.0 Hi there, I have this connect script I have made. I was wondering if it's secure or not, if not... What would be a good way to do so... Code: [Select] <?php class connect{ public $host = "localhost"; public $dbuser = ""; public $dbpass = ""; public $db = ""; } $connect = new connect(); mysql_connect($connect->host,$connect->dbuser,$connect->dbpass) or die("Could not connect!"); mysql_select_db($connect->db); ?>
According to I have a project need to use PHP 5.6.40 connect to mysql version 5.7.34
when I try to connect it by below coding $servername = "localhost"; $username = "user"; $password = "pass"; $db_database = 'db_unelr'; $db_port = '3306'; // Create connection $conn = mysqli_connect($servername, $username, $password,$db_database,$db_port); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } echo "Connected successfully";
it's show 500 internal error.
Hi, This is an odd one (to me anyway). I've created an API for deploying gig information in either XML or JSON format. It works fine as it is, both formats of output giving me what I want. When I take out the mySQL login information and replace it with "include 'connect_include.php';" (where the file connect_include.php contains the exact login code that I replced). The JSON output works fine but the XML output doesn't run. What could be causing this?? JSON API: -http://www.api.the-guards.co.uk/jsontest.php?apikey=123456&format=json XML API: - http://www.api.the-guards.co.uk/jsontest.php?apikey=123456&format=xml API code: Code: [Select] <?php if (($_GET['apikey'])==123456 and isset($_GET['format'])){ //Set variables $format = strtolower($_GET['format']); //Connect to the Database include 'connect_include.php'; //Run our query $result = mysql_query(' SELECT * FROM tg_gig_list where gl_date >= curdate() and gl_publish = 1 order by gl_date '); //Preapre our output if($format == 'json') { while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { $array[] = array($row['gl_date']=>($row['gl_venue'].', '.$row['gl_city'])); }; $output = json_encode($array); //Output the output. echo $output; header('Content-type: application/json'); } elseif($format == 'xml') { header('Content-type: text/xml'); $output = "<?xml version=\"1.0\"?>\n"; $output .= "<tggiglist>\n"; for($i = 0 ; $i < mysql_num_rows($result) ; $i++){ $row = mysql_fetch_assoc($result); $output .= "<giglist> \n"; $output .= "<giglist_date>" . $row['gl_date'] . "</giglist_date> \n"; $output .= "<giglist_venue>" . $row['gl_venue'] . "</giglist_venue> \n"; $output .= "<giglist_city>" . $row['gl_city'] . "</giglist_city> \n"; $output .= "</giglist> \n"; } $output .= "</tggiglist>"; } } else { die ('no way'); } //output the output echo $output; ?> Contents of 'connect_include.php: Code: [Select] <?php mysql_connect("database.lcn.com", "dbname", "password") or die(mysql_error()); mysql_select_db("db") or die(mysql_error()); ?> .....this is the same code that I replaced. Obviously, the 'connect' works ok as the JSON version runs fine. There's something being added to the scripting when I use the include file that isn't there when the code goes straight in.....I think???? your MySQL server version: 5.1.36 Code: [Select] SELECT * FROM game_weapons Table: Picture Attached the EXPLAIN output for your query, if applicable: I wish to connect a drop down menu's selection of weapons with the correlated table information. What do I want to happen: Click on a drop down Menu and have a list of weapons, these weapons are associated with a set number in the database and passed onto the next screen. (The larger number wins, this part I have figured out). <p> <select name="weapon2" style="font-size:20px;font-family:Arial;width:275px"> <option value="power">Power</option> <option value="intelligence">Intelligence</option> <option value="speed">Speed</option> <option value="reserve">Reserve</option> </select> </p> I do have the battle code figured out! (This should be the last step). Hi, I have just started using PHP again after a long break and am very rusty. I am having a few problems with some basic things: I have defined a function to connect to my MySQL database and it doesn't work. My $hostname, $username, $password variables are stored in a separate php file which I am including first and the standard mysql_connect function works ok, but I wanted to put it inside another user defined function called "condb" to make things quicker later. my function looks like this: function condb(){ mysql_connect($hostname, $username, $password) OR DIE ('Unable to connect to database! Please try again later.'); } and I am trying to run it like this: condb(); Unfortunately it is not working. Probably a basic error but any help appreciated. Thanks Im making a site for my family to leave messages for everyone to see but every now and then the message wont load and i get theses errors, Warning: mysql_connect() [function.mysql-connect]: Too many connections in /home/#####/public_html/#####.com/messages.php on line 17 Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/#####/public_html/#####.com/messages.php on line 18 Warning: mysql_query() [function.mysql-query]: Access denied for user '#####'@'localhost' (using password: NO) in /home/#####/public_html/#####.com/messages.php on line 21 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/#####/public_html/#####.com/messages.php on line 21 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/#####/public_html/#####.com/messages.php on line 24 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/#####/public_html/#####.com/messages.php on line 25 Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /home/#####/public_html/#####.com/messages.php on line 54 i also recieved this error once Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) The hosting support team have been no help at all. |