39,320 Topics
| |
i wanna add date in my form.. so i do with my code like this $sql_updTenant = "UPDATE md_tenant SET modifieddt = '".date('Y-m-d H:i:s')."'"; and in my php.ini, i already change this: ; Defines the default timezone used by the date functions ;date.timezone = to this: ; Defines the default … | |
Hey everyone, I was randomly trying to develop a web browser that works in php. I know this is a really small program if you look into it but I dont seem to get it to work. though I have worked it out, but I cant get it to display … | |
<?PHP $time = $_POST['Time'];//The things in the [] can be anything you want, but remember these for later $xp = $_POST['X']; if($time <= 0) $time = 0; if($xp <= 0) $xp = 0; $db_handle = mysql_connect($server, $user_name, $pass_word); $db_found = mysql_select_db($database, $db_handle); if ($db_found) { $SQL = "SELECT * FROM … | |
Hi, I have an API script provided to people fetching data from my website. Other than stats information, how can I get to know that which websites are connecting my website's API? Any php function that I can include in my API script to get their domain names then insert … | |
Hello there, I've created an upload system with PHP and its working fine but I need to improve it by using jquery, I need only a progress bar for uploading operation I don't have **apc** installed on server and can't tell the server owner to install it for me is … | |
Hye guys, sorry, can anyone let me know why this code is not function in IE,but it doing great in chrome. Thanks in advance! ;) <?php //include("Connection.php"); backup_tables('localhost','root','1234','leave'); /* backup the db OR just a table */ function backup_tables($host,$user,$pass,$name,$tables = '*') { $link = mysql_connect($host,$user,$pass); mysql_select_db($name,$link); //get all of the … | |
Hi, I am a site owner with zero php experience. I have accidently deleted one letter from a header script and it caused my site to crash. I need desperate help. It shows Parse error: syntax error, unexpected T_STRING in /home/spark496/public_html/www.sourcetutoring.com/wp-content/themes/directorypress/header.php on line 152. Can any expert please help? This … | |
Hi guys! Is there anyone can help me to do import and export database from my sql? i don't have any idea how to do it. I don't want to do it manually which is using phpmyadmin. So, i want to make it easy only by click the export button. … | |
Hello I have a website and have some problems whit index of him on google search.I wish indexing my site with several under it, not sure how to explain but I will put a picture below so you can understand more easily. Thank you! If there is any method relies … | |
I am trying to make an array which has a random selection of database results in it. This is what I have so far, <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("photos", $con); $query="SELECT album FROM albumname ORDER BY RAND() LIMIT 9"; $result= … | |
hi...im a newbi in php..so i really in need of help.. i got an error like this : Query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 SELECT … | |
I have a site that has categories of images generated from the database, I am trying make it so when the user selects a category, the query is based off of that selection and the respective images load. Is that something that can be done? Here is my current code. … | |
Is there a service available to have someone translate your code from mysql to PDO or Mysqli? Pay service or free. I just know I'm in over my head. Thank you. | |
Hello guys , i am new around here.Need help with one script its for movie's web site, i need to add more than one picture in database. The code is: <?php @mysql_connect($host,$user,$password); @mysql_select_db($db); @mysql_query("SET CHARACTER SET cp1251") or die( "Не мога да избера БД"); if(isset($_POST['submit'])){ $kategoriq = htmlspecialchars($_POST['kategoriq']); $seriq = … | |
Hey guys, Does anyone know a good script out there that could be used for hosting scripts? Like for example you can have a look an Ning.com SocialGo.com and Grou.ps . You signup with them and they give you a sub directory with another social netwprking script inside it. Currently … | |
I'm trying to get the hang of PDO and I can't seem to get this to work. I'm tyring to insert some data into a databse, but nothing shows up when I click submit. What am I doing wrong? <?php require 'connect.php'; if (isset($_POST['username'], $_POST['password'])) { $username = $_POST['username']; $password … | |
Hey Guys, I found some code from a fellow I used to work with and am trying to dissect what it all means.(b/c im trying to build a similar application). Anyways, I'm pretty much a rookie when it comes to programming; I've really only been doing it for about 3 … | |
Okay so I have created a function which brings up a column of information into a html drop down menu from a certain table. Now I want the data selected to be put into a value so it can be used in an upload form. This is the function. Thanks … | |
Hello< i am having an issue with IF statements displaying the right data. Im selecting from my databse the userlevel an depending on the number access they have it will show verbage as opposed to the number. Easy enough a simple IF statment and bam. SO I test it with … | |
I am saving user's images as blob in database. problem is that after retrieving that blob image,i want to save it in a temporary location of web server and from there i want to apply some business logic. please anybody help me to solve this. Thanks in advance | |
Hello, My weather station software produce an XML file with live info about temperature, Wind, etc. It is possible grab this info to mysql db every 5 minutes and organize for day, month and year? Thanks | |
Hi there I have the following code. <script language="text/javascript"> banner1 = new Banner('banner1'); <?php $con = mysql_connect("localhost:3306","User","Pass"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("barndata", $con); $today = date("Y-m-d"); $result = mysql_query("SELECT * FROM event where Date >= '$today' ORDER BY Date ASC LIMIT 0, 7") ; … | |
Please analyze the following code. This is being used in CodeIgniter framework... $results["rows"]=$this->Category_model->getAll(); $i=0; while($i<count($results["rows"])) { //$parentids[]=$results["rows"][$i]->cat_id; $disparray[]=array( "cat_id" => $results["rows"][$i]->cat_id, "cat_name" => $this->Category_model->fetchcatinfo($results["rows"][$i]->cat_id, "cat_name"), "cat_parent_id" => $this->Category_model->fetchcatinfo($results["rows"][$i]->cat_id, "cat_parent_id"), "cat_desc" => $this->Category_model->fetchcatinfo($results["rows"][$i]->cat_id, "cat_desc"), "cat_num_posts" => $this->Category_model->fetchnumposts($results["rows"][$i]->cat_id), "cat_parent_id_name"=>$this->Category_model->fetchcatinfo($this->Category_model->fetchcatinfo($results["rows"][$i]->cat_id, "cat_parent_id"), "cat_name") ); $array=explode(",",$this->Category_model->fetchallkids($results["rows"][$i]->cat_id,0)); foreach($array as $item) { if(strlen($item)>0) { $spacecount=substr_count($item," "); $id=str_replace(" ","",$item); $spaces=array(); … | |
Hello! I'm creating a larger scale application in PHP and i'm using a .ini file to store some configuration for the user, quite easy to fetch data with the parse_ini_file function (returns array) but how would I write to a ini file, or the most convienient way to do so. … | |
This is my upload form for html to upload only one pic, <html> <body> <form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file"><br> <input type="submit" name="submit" value="Submit"> </form> </body> </html> I want to be able to upload multiple pictures at once. This is my php code for uploading. <?php … | |
I am currently working on a membership registration web form, wherein we have to take details of the member being registered online. i need to know his Country, State/Region and City. i am looking for a database/list so that we can provide the same in a combobox in the registration … | |
Hello to everyone, im having some trouble in setting a position on a table in php. I learn how to display a table in php on school and with some research through the internet, but not how to customize it. Is it possible to display a mysql table from a … | |
how to get part of col name in query. for ex: les say i have these rows in table: id name last address 1 dave da new york 2 rand ra ohio 3 random a new now i want to get rows where address has a word new in it. … | |
Hey guys! I see alot of discussions going on in this community. Well, I am new here. Was just going through random discussion threads and I can see how much efforts goes into all this. Really appreciate. I have something to ask. I am working on a warehousing/inventory management application … | |
The End.