PHP - Get Hardware Details
Hey, i want to make a system requirements check website, and i want it to get the hardware specs automatically. Are there any java-php scripts that allow this? I would do it myself, but i do not know how to code java. Any thoughts?
Similar TutorialsI am working on a web application in php for ipad. I need to retrieve the ipad's unique identifier programmatically. Is there any way i could check the unique identifier of an ipad in the php application. Hi, I have successfully implemented a master details page with the results aligned in columns linking to a details page. I wish to maintain the recordID passed from the master details page and make the dynamic text, which reads Shade A tree that is capable of..... in the attached screen shot a link to another details page referencing the same recordID. The detailspage2.php would look the same as the screenshot except the Shade text and description below will be highlighted, which I can do, there will be a new image and a new image description. All other dynmaic elements on the page will remain the same. I tried to simply save as my detailspage.php to detailspage2.php and create a link to detailspage2.php. It linked to detailspage2.php but none of the record info showed up in their respective table cells. I have all the names desc's, images, etc setup in a table in my database. Please let me know what code and other info you need to help me out with this procedure. Thanks. hi all I have a table which i have got results from a database. My question If i want to display the details of a particular row. How do I do that? Thanks Rgds Hi, I have created a form (code below) to show details about members of my website. When the user enters the username of a certain member the form should retrieve these details from my database(phpmyadmin) and display them. I cant get this to work. Here is the code for my form: <form id="form1" name="form1" method="post" action="getdetails.php"> username <input type="text" name="textfield" value ='' /> <input type="submit" name="Get Details" value="Get Details" /> </label> </p> </form> Here is my getdetails.php file <?php mysql_connect ("localhost","root",""); mysql_select_db ("test"); $sql = "select * from memberdetails"; $result = mysql_query ($sql); while ($row = mysql_fetch_array($result)) { $username= $row["username"]; $firstname= $row["firstname"]; $surname= $row["surname"]; $dob= $row["dob"]; $totalwins= $row["totalwins"]; $totalloses= $row["totalloses"]; $email= $row["email"]; $country= $row["country"]; $info= $row["info"]; echo "<b><u>Username:</b></u> $username<br>"; echo "<b><u>Firstname:</b></u> $firstname<br>"; echo "<b><u>Surname: </b> </u> $surname<br>"; echo "<b><u>Date of Birth:</b></u> $dob<br>"; echo "<b><u>Total Chess Wins:</b></u> $totalwins<br>"; echo "<b><u>Total Chess loses:</b></u> $totalloses<br>"; echo "<b><u>Email Address: </b></u> $email<br>"; echo "<b><u>Born in: </b></u> $country<br>"; echo "<b><u>Other Details:</b></u> $info<br>"; } ?> The above code displays all the users' details from the table not just the one which was typed in. Thanks for any help! If I were to write a code where the browser details and resolution are to be displayed, would the following code work? Code: [Select] //Here, I am using the "</body>" tag to end the body of the webpage and the "</html>" tag to end the HTML script </body> </html> //By using the "<?php" code, I am creating a PHP script and when I use the "function" keyword here, I am creating a function called Identification with no arguments in the parameters <?php function Identification() //Here, I am creating a variable called "$viewer" //The value of this variable uses the "getenv" library function and the "HTTP_USER_AGENT" is what the "getenv" library function will be performed on and the value of this is that value of the $viewer attribute //The code uses the ";" to end the command $viewer = getenv ("HTTP_USER_AGENT"); $width= $_get['width']; $height=$_get['height']; //Here, I am using the "echo" library function and the "$viewer" attribute as well as the "<b> (bold)" tags to write a formatted string to the webpage //I then use the ";" to end the command and I use "?>" to end the PHP script $msg = "Browser details: $viewer"; $msg .= "Resolution is $width pixels long and $height pixels high"; echo ($msg); ?> //Here, I am using the "<html>"<head"> and "<title>" tags as well as the "</head"> and "</title>" so that I can write a title (Browser + Platform Identification Script) for the webpage that the script will be shown on <html><head><title>Browser + Platform Identification Script</title></head> //Here, I am using the "<body>" tag to create the body of the webpage <body> //Here, I am using the "<?php" code so that I can start a PHP script that will run the Identifcation script and show the results on a webpage <?php Identification() //I then use the "}?> to end the PHP script ?> //Here, I am using the "</body>" tag to end the body of the webpage and the "</html>" tag to end the HTML script </body> </html> Thanks, Andrew Hello, I am new to PHP and am trying to make a script that will ftp into the server via a cron of every hour or so and save the data to a mysql table. The first step is to draw variables out of information in the file via ftp. Its a ban list for a game server I run. How could I get php to single out the ban reason, admin, etc. the looks like this Code: [Select] "STEAM_0:0:42741441" { "name" "good mom" "unban" "0" "time" "1329161245" "admin" "(Console)" "reason" "no more trolling for you" } "STEAM_0:1:40563669" { "unban" "0" "admin" "Headcrap(STEAM_0:1:42287608)" "time" "1332855999" "reason" "" } "STEAM_0:1:17693550" { "name" "ʎɖɑɱ" "time" "1323055427" "modified_time" "1323221308" "unban" "0" "modified_admin" "Strategos(STEAM_0:0:26662109)" "admin" "Strategos(STEAM_0:0:26662109)" "reason" "And so died the trolling" } Example: Code: [Select] <?php $bannedid = "STEAM_0:0:42741441"; $bannedby "(console)"; // and so on ?> Hi all, I am trying to write a script where the user can update their details. The html form sends the details across to this php file below. All the php variables echo after the query however the values do not replace the current values in the mysql database. Also for some reason the fname is the only one that changes no matter what the value is. It is entered in to mysql as '0'. I think the problem will be in the php below. As all the information below is echoed correctly, and because the value of 'fname' changes I know the connection is working fine. I guess the error must be in the query I have written, however there is no error that comes up... Hope you can point me in the right direction. Thanks <?php include("../cxn.php"); $fname = $_POST['fname']; $lname = $_POST['lname']; $newemail = $_POST['newemail']; $telephone = $_POST['telephone']; $icao = $_POST['icao']; $newpassword = $_POST['newpassword']; $id = $_POST['id']; $sql = "UPDATE Members SET fname='$fname' AND lname='$lname' AND email='$newemail' AND telephone='$telephone' AND password='$newpassword' AND icao='$icao' WHERE id='$id'"; $result = mysqli_query($cxn,$sql) or die ("Couldn't execute query"); echo "Your new details a <p>"; echo "$fname <br> $lname <br> $newemail <br> $telephone <br> $icao <br> $newpassword"; ?> Hi, I am writing a little code that would populate the server name based on $_SERVER['HTTP_HOST']. My code and the error I encounter are given below. Can we ever use $_SERVER in a class? class Get_server_name { if ($_SERVER['HTTP_HOST'] == 'localhost'): $hostname = 'localhost'; else: $hostname = 'my remote server'; endif; } Error I get: Parse error: parse error, expecting `T_FUNCTION' in Hello guys I have created a form and after entering details in the form user will click the generate button after that will get the qrcode. The problem I am facing is that when a user wants to change the qrcode details then it should upload the qrcode and change but how to do it I have no Idea any help will be appreciated. The QRcode created using the PHP library. If you need some more information then you can reply m. i am working on a project in which i am facing a problem. my question is that is it possible to get information/details of a user who is not logged in or who is not registered. if a user logged in then we can find get details easily. but how can i do this. is it possible. Hi, Im developing a program and it contains bank details in some of the fields stored in the MySQL database. As part of the upload, I need to find bank details and then mask them by replacing them with XXXXXX for security purposes. An example of a field could be "TRANSFER 540021 61782457" and I need to replace to "TRANSFER XXXXXX XXXXX457" Any ideas to the best possible method? Maybe I would mask blocks of numbers (ie numbers in blocks of 6 or 9) to cover this...im not sure what the best possible way is. Thanks! hello sir, I have created website where a user can create qr code by submitting data in form. I want users to edit qr code as well do you know how to do it ? I have added qr code reader but it reads that data in qr code but I want the data to be edited by user. Hello. I just created a product gallery containing thumbnails of items that I will be selling. When a user click on on of the thumbnails, I want a product details page to appear with more details about the chosen product Could use some feedback if I am going about things the right way... Step 1: User goes to my gallery located he www.mysite.com/store/product-gallery.php Step 2: System displays a page of thumbnails representing items that I am selling. Step 3: User click on a given thumbnail which is a hyperlink to: www.mysite.com/store/products/4571 Step 4: System rewrites the URL as such: www.mysite.com/store/products.php?sku=4571 Step 5: System queries MySQL and retrieves record for sku 4571 Step 6: System displays product details for the chosen item in Step 3 which is sku 4571
How does that sound?
Perhaps this is a rather lay question, but, is there a way to gather specific connection details about an open MySQL connection in php? Example: <?php $connect = mysql_connect('localhost', 'username', 'password'); ?> Using the $connect variable, could I run a command that dumps the host, and username to a log file?? Thanks in advance, I'm still searching. E Code: [Select] $sql= ("INSERT INTO custcards (username,Card_Number,Card_Type,Card_Name,Card_End) VALUES('$username','$cardnumber','$cardtype','$cardname','$cardend')"); if (isset($_GET['submitted'])) { if (checkCreditCard ($_GET['CardNumber'], $_GET['CardType'], $errornumber, $errortext)) { $errortext = 'This card has a valid format'; // Default text if card is VALID $result = mysql_query($sql)){ echo "$errortext"; // Echo/Show this text } } else { echo '<p align=center>';echo "$errortext"; // Display ERROR Type/Text echo "ERROR: ".mysql_error(); } } The code is to check details beign entered and to make sure thier correct and then print the correcrt message but i also want it to store the details into a table i know i havent got the syntax correct was wondering is anyone can help ? I need some help please. I have a project that has a login script that is required before moving to a shopping cart and each use a session. I have a login script that i know works separate of the cart and vice versa. The problem is that when i access the cart i get the session errors and it quits working. So i need help with getting the 2 combined so i can run the cart script while a user is logged in. Here is the code i have. This is the login script session: <? ob_start(); session_start();include_once"config.php"; if(!isset($_SESSION['username']) || !isset($_SESSION['password'])){ header("Location: login.php"); }else{ $user_data = "".$_SESSION['username'].""; $fetch_users_data = mysql_fetch_object(mysql_query("SELECT * FROM `members` WHERE `username`='".$user_data."'")); } ?> This is the script session for the shopping cart: <?php require_once 'library/config.php'; require_once 'library/category-functions.php'; require_once 'library/product-functions.php'; require_once 'library/cart-functions.php'; $_SESSION['shop_return_url'] = $_SERVER['REQUEST_URI']; $catId = (isset($_GET['c']) && $_GET['c'] != '1') ? $_GET['c'] : 0; $pdId = (isset($_GET['p']) && $_GET['p'] != '') ? $_GET['p'] : 0; require_once 'include/header.php'; ?> and any help is very much appreciated. I have created a button which when pressed should present the user with their details (whoever is logged in), here is the form code: <form id="form1" name="form1" method="post" action="getdetails.php"> <input type="submit" name="Get Details" value="Get Details" /> </label> </p> </form> Here is the getdetails.php file <?php mysql_connect("localhost","root",""); mysql_select_db("test"); $username = $_POST['textfield']; echo '</br>'; $query = mysql_query("SELECT * FROM membersdetails WHERE name=`$username` "); while($result = mysql_fetch_array($query)) { //display echo $result['firstname']; echo $result['surname']; } ?> Its not workin at all I have attacthed the error i am getting Any help please? after the user has logged in, I would like to display their details by barcode id Login.php <?php $host=""; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name=""; // Database name $tbl_name=""; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); session_start(); // username and password sent from form $barcodeID=$_POST['barcode']; // To protect MySQL injection (more detail about MySQL injection) $barcodeID = stripslashes($barcodeID); $barcodeID = mysql_real_escape_string($barcodeID); $sql="SELECT * FROM $tbl_name WHERE BarcodeID='$barcodeID'"; $result=mysql_query($sql); $count=mysql_num_rows($result); if($count > 0){ $data = mysql_fetch_array ($result); $_SESSION["user_id"] = $data["BarcodeID"]; $_SESSION["user_firstname"] = $data["Firstname"]; $_SESSION["user_surname"] = $data["Surname"]; $_SESSION["user_jobrole"] = $data["JobRole"]; $_SESSION["user_manager"] = $data["Manager"]; $_SESSION["user_priority"] = $data["Priority"]; $_SESSION["user_datejoined"] = $data["DateJoined"]; $_SESSION["user_times_loggged_in"] = $data["TimesLoggedOn"]; if ($_SESSION["user_priority"] == '1') { header("Location: AdminSection.php"); } else { header("Location:LoggedIn.php"); } if ($_SESSION["user_times_loggged_in"] == '0') { header("Location:UsingTheSystem.html"); } } ?> LoggedIn.php I keep getting the error undefined index "barcode"? <?php $barcodeID = $_POST["barcode"]; include 'dbcon.php'; $sql = "SELECT Firstname, Surname, JobRole, Manager" . " FROM users" . " WHERE BarcodeID = .'$barcodeID'" ; $rows = mysql_query($sql); echo $rows; ?> Any help will be greatly appreciated Thanks Hey i have created the code below attempting to show a specific members details when their username is entered and the submit button is pressed. but when i enter the username all members details are shown. The code i have used is shown below, can anybody help me with the code to just show the single users details. I have attached an image aswell. <?php mysql_connect ("localhost","root",""); mysql_select_db ("test"); $sql = "select * from memberdetails"; $result = mysql_query ($sql); while ($row = mysql_fetch_array($result)) { $username= $row["username"]; $firstname= $row["firstname"]; $surname= $row["surname"]; $dob= $row["dob"]; $totalwins= $row["totalwins"]; $totalloses= $row["totalloses"]; $email= $row["email"]; $country= $row["country"]; $info= $row["info"]; echo "<b><u>Username:</b></u> $username<br>"; echo "<b><u>Firstname:</b></u> $firstname<br>"; echo "<b><u>Surname: </b> </u> $surname<br>"; echo "<b><u>Date of Birth:</b></u> $dob<br>"; echo "<b><u>Total Chess Wins:</b></u> $totalwins<br>"; echo "<b><u>Total Chess loses:</b></u> $totalloses<br>"; echo "<b><u>Email Address: </b></u> $email<br>"; echo "<b><u>Born in: </b></u> $country<br>"; echo "<b><u>Other Details:</b></u> $info<br>"; } ?> hi, i'm new in php/mysql. i'm stored student marks values in following format in mysql db table. id student_code Tamil English Maths Science Social 1 1 100 75 78 88 95 2 2 85 90 88 80 100 But i want to search and display the specific student marks in following format. id:1 student_code:1 Tamil:100 English:75 Maths:78 Science:88 Social:92 Total:? Avg:? please give correct code for this format. |