39,320 Topics
| |
| As stated in the title, I'm trying to load a single row of user information into an array, preferrably associative. Here's what I have so far: function load_User_Info($id) { $parameters = array(); $results = array(); $query = "SELECT * FROM users WHERE User_ID=$id"; $stmt = $this->conn->prepare($query) or die('Error preparing query'); … |
Hello to all! I have an online manual (developed in php)that my company would like to revise for printing purposes. What I need to do is have this manual setup to include page numbering on the printed version so the instructor can reference pages during training sessions. They have expressed … | |
# whenevr i execute ne "select *"for any database the error belo is shown,is there any setting in phpadmin....coz this problem occured 1 fine day.....pls help. # <html> <head></head> <body><html> <head> </head> <body> <?php $con = mysql_connect("localhost"); if (!$con){ die("Can not connect: " . mysql_error()); } mysql_select_db("snippets",$con); if(isset($_POST['update'])){ $UpdateQuery = … | |
Hi hope you can help with this. Fields have spaces in the fields being echoed, how would I use the replace to change those spaces to a dash. 'Make' field will be something like blar blar blar and I need it to be blar-blar-blar <h4><a href="">'. $row['Make'].'</a></h4> Hope you can … | |
Hi I am trying to echo this info with the different rows in the database but when I try the following code only the first result shows up. Please can someone help <?php $con = mysql_connect("localhost","blar","blar"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("blar", $con); $result = … | |
code: I am trying to debug the code, I can't understand why (or how) the same error is being thrown despite the if statements, dies, and different mysql_queries. I don't get it. <?php session_start(); $_SESSION['msg'] = ""; $con = mysql_connect('localhost','me','omglol'); if(!$con) { die("The connection to mysql server is not being … | |
Consider the following code: while($row=mysql_fetch_assoc($result)){ echo '<tr> '; echo '<td><a href="#?id='.$row['id'].'" class="dep_link"><img src="images/icn_edit.png" title="Edit"></a> <a href="#"><img src="images/icn_trash.png" title="Trash"></a></td>'; In my php form, i have created a jquery dialog link such that when the user clicks the 'icn_edit.png' image , a new iframe is loaded with fields for update. i want to … | |
using php,sql and wamp server.how can i update the web page content without sending the data into the database? | |
Greetz to you all Well i have an array that contain some characters and i want to check if they form part of a string.If yes then they should be deleted How to do this via php For e.g $string = 'Dani.web'; $charRemove = array('.','-','~','#','!','(',')','+',','); I want to get a … | |
Hi there , can anyone tell me easy way to change ""session_save_path("/home/users/web/b1580/glo.uniquelb/cgi-bin/tmp");"" to different session_save_path("/home/XXXX/public_html/cgi-bin/tmp"); there are over 200 files and i dont want to go through each file manually .. any help will be appereciated. | |
I have a "New Employee" script, that when you enter the details it creates a folder according to their username, using mkdir, this all works fine, I now have managed to import 200 entries into my DB from a spreadsheet, but I need to create a folder for all the … | |
Hi, I'm developing a Stock website , What i need when ever i add any product in the list , their seperate page automatically created, Currently i use session or query string for that , what it load all the product on the same page ... which means my site … | |
| Hi I'm just learning the date() function. I'm trying create a `Daylight Savings` I used `$todayDate = date("D-m-d-Y-T-a");` because I am going to run it that day. For example: `Daylight Savings is on Sunday, November 4, 2012, 2:00am.` My issue is that once I run the code my answer is … |
Hello guys, is there any way to display variables from highest to lowest **without storing them into an array**? For example i got multiple variables *$numone = 500; $numtwo = 600; $ numthree = 700;* and i want to display it out base on their value. Any help is much … | |
hi everyone got an issue trying to get certain results from a list generated from a database.. ill try and set the scenario basically i want the same thing as the left hand menu here https://www.elance.com/r/jobs/cat-design-multimedia/ ...if you notice at the sides of the categorys theres a value of how … | |
I am trying to send a email everytime a customer sign-up using my form. I want the email to work in the background. I have created a mysql database and set the form/webpage. How would I go about making this. Is there a way to send a email in the … | |
Wordpress Site regularly getting injected by codes, which is throwing following error in browser Parse error: syntax error, unexpected '}' in /home/client/public_html/design/wp-includes/functions.php on line 3753 Multiple sites are having these problems - is this a Virus injected in Wordpress? Anyone facing similar problems ? can you suggest how to make … | |
hi team ... I am bachelor student i have required new web based project ideas for my final year project. I need some help.. | |
I have two tables that are the same. One stores info for the offense and a second for a defense. $sql = mysql_query("SELECT player FROM offense GROUP BY player UNION SELECT player FROM defense GROUP BY player"); while ($row = mysql_fetch_array($sql)) { $player = ($row['player']); echo "$player<br>"; } The problem … | |
Hi Im having a go at this, but not good on the php thing, thats why im hoping you can help. I am trying to set up a jump script from one I have used for 1 or 2 urls, now I have a database of around 500000 lines, each … | |
This could be a PHP issue or a linux issue. My form uses the following code to allow users to upload their banner and worked fine on my old server: if ($_FILES["banner"]["name"]!="") { $folder_path = "images/server_banners/"; $myfileext=substr($_FILES["banner"]["name"], - 4,4); $banner_file_path=$username."-".$server_id.$myfileext; $file_path = $folder_path.$banner_file_path; if (file_exists($file_path)) { unlink($file_path); move_uploaded_file($_FILES["banner"]["tmp_name"],$file_path); } else … | |
hai everyone! now add a product details is successfully in my table.and add,update,delete is also worked successfully.suppose i want to see product details added for which date and time. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Books</title> </head> <body> <form method="post"> … | |
i have a php application where users can apply for a bonus. but there is a confirmation page before the bonus redemption code runs. the issue is that in IE, if you hit f5 right after you click the continue button, the confirmation page refreshes while the bonus redemption code … | |
Basicly I try to send values to a PHP Server and read out returned information I get from the Server. The PHP code is not the problem. My Problem is I don't know how I can send values with C++. I don't have any code yet because I don't know … | |
I am delving into trying to understanding how the MVC structure works. I am following a [tutorial](http://anantgarg.com/2009/03/13/write-your-own-php-mvc-framework-part-1/) and a little bit down the page where is is explaining the Controller class and how it initiates the Model and View there is some code there that does not quite look right … | |
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a1039476/public_html/getdetails.php on line 69 help <form action="getdetails.php" method="post"> Search Within: <select name="searchtype"> <option value="CustomerID">Customer ID</option> <option value="CustomerName">Customer Name</option> </select> Search Record: <input name="searchterm" type=”"text" size="20"/> <input type="submit" name="submit" value="Search"/> </form> <?PHP echo "<title> *********** </title>"; $searchtype=$_POST['searchtype']; $searchterm=trim($_POST['searchterm']); if … | |
Below i made a MySQL Table in my phpmyadmin. [Click Here for a screenshot of my phpmyadmin table](http://i.stack.imgur.com/7gl77.jpg) I want to print on my php page the cat_name of a cat_id of my choosing. What code would i use exactly for that? I am looking at this guide here But … | |
Hi guys! I don't know if i post it in the right forum page, but I would like to ask if it's possible to put color on the last row of your table (LAST ROW ONLY). the data is from SQL. I would appericiate any references or links, snippets, anything! … | |
onload mysql 'query' will be executed then if the visitor will hit search the mysql 'querysearch' will be executed how to do that? <form action="default.php" method="post"> Search Within: <select name="searchtype"> <option value="CustomerID">Customer ID</option> <option value="CustomerName">Customer Name</option> </select> Search Record: <input name="searchterm" type=”"text" size="20"/> <input type="submit" name="submit" value="Search"/> </form> $searchtype=$_POST['searchtype']; $searchterm=trim($_POST['searchterm']); … | |
I have a form and a csv file. The inputs go into the csv quite well but for some odd reason, they display in one row... why is that? I want multiple rows per submission... PHP: <?php $fn = $_POST['fn']; $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $comments … |
The End.