39,326 Topics
| |
I am using the followng code, to import csv into mysql. if($_POST['sform'] == "1") { $fname = $_FILES['upload']['name']; $chk_ext = explode(".",$fname); if(strtolower($chk_ext[1]) == "csv") { $filename = $_FILES['upload']['tmp_name']; $row = 1; if (($handle = fopen($filename, "r")) !== FALSE) { while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $row++; $data_entries[] … | |
i pasted this code into my child theme's functions.php file (begining on line 5, //Custom CSS styles...), which is resulting in an unexpected T_string error on my site. any ideas how to fix? <?php add_theme_support( 'builder-3.0' ); // Custom CSS styles on WYSIWYG Editor – Start if ( ! function_exists( … | |
hello: I'm pulling mysql data and want to load into an array. I getting the data in like manner: $result = mysql_query("SELECT DISTINCT item2 FROM products"); echo "var option_array = new Array(num_of_cats);\n"; $count=1; echo"option_array[0] = new Array(\"Please Select a Merchandise\");"; while($row = mysql_fetch_array($result)) { echo"option_array[".$count."] = new Array(\"--select One--\",\"\",\"\");"; $count++; … | |
hey guys, im building a small prediction software, the GUI is in PHP and i want to do the data crushing in C. (sequence, matrix and multiple variables isolation) i know the basics in C, but im no C expert. Is it possible to pass from C to PHP other … | |
I recently converted all my .html files to .php, and while the stylesheet they're linked to (which hasn't changed) works almost perfectly, the <h1> through <h6> tags (headings) don't work with the new .php files. The font appears the same size as the body, which is too small to be … | |
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 4 in /yyyyyyy/BID-REF-URL-No-account.php on line 21 what is this about , any relation with "index"? I lookup everything but not find the bug? | |
Assaam-O-Alikum.! I am new Here. I Want to learn PHP and i want to have completely command on C++. | |
I want to use a php variable into HTML tag id . For e.g. <?php $temp='123'; ?> Now i want to use $temp as a ID in DIV say <div id="$temp"></div> How i'm able to do this . | |
If i removes error_reporting(0) function it gives error " undefined index tm ".can any one have solution sothat i can use this script without this function. <?php require '../zones/publisher_header.php'; ?> <Script language="JavaScript"> function goto(form) { var index=form.select.selectedIndex if (form.select.options[index].value != "0") { location=form.select.options[index].value;}} //--> </SCRIPT> <h2 style="padding:25px;border:1px solid red; width:90%;">Publisher … | |
Hello Everyone, Am working on a project with includes php and mysql database.Everything works fine but i fail to make the validation work or i guess don't know how. I got a form and i would like if the user input numeric or less character to submit an error message. … | |
hello i am developing a website and i have a problem. when i enter a keyword in my search tab, it works fine and displays all the products matching with the keyword. when i click on a single product the product page opens fine also. but i want all the … | |
Hi everybody, i asked many times.but i cannot get expected result.so i asked agian. anybody plz help me. this code,did not display fancy box.the requested content cannot be loaded message display. i created planmate url. $(document).ready(function(){ $(".planbooks").fancybox(); $('#planbook-content').bind('click',function() { $.ajax({ type :"post", catch:false, url : $("#planbook_planmate"), data :{title_name:'title_name',} success:function(data) { … | |
I am writing html and css to design in php. But when i am opening in ie, chrome and firefox. every where its showing different. Means all dimension going to change. I am using % for body wrapper and em for fonts but its not working. Is here any help?? … | |
| Hi, my jQuery link is not working. Its only work if I'm not using `href` attribute on that link. Currently its only functioning when I put the `URL` into `alt`or `title` attribute for example. When I put the url on `href` attribute it will not run as AJAX. Sorry if … |
my image database: image_id user_id image(long blob-store images) image_name...etc on gallery.php i just want to print all the image of who ever is loged in. here is what i did: first i got username and id of whoever is loged in. $user = $_SESSION['username']; $id = $_SESSION['user_id']; than i select … | |
here is my sql data from my search.php page mysql_connect("localhost", "username", "password") or die( mysql_error() ); mysql_select_db("dbname") or die( mysql_error() ); mysql_query("SET NAMES utf8"); $find = strtoupper($find); $find = strip_tags($find); $find = trim ($find); mysql_query("SET NAMES utf8"); $data = mysql_query("SELECT * from database WHERE upper($field) LIKE'%$find%' ORDER BY Catalog ASC"); … | |
<td><a href="$_SERVER['PHP_SELF'] . '?id=' . $myrow["article_tittle"] ">'.$row["article_tittle"].'</a></td> what's the error in above code, its showing error Parse error: syntax error, unexpected T_STRING in ...../class.article.php on line 64 Please identify | |
I recently converted all my website's files to .php, including my index.html and 404 page. Everything worked fine until I clicked a dead link, and no 404 page came up. Naturally, I figured I forgot to update the .htaccess file. After doing so and re-uploading it, every page on my … | |
| Hi I'm trying to append the content from one of the view file (page.ctp) into another view file (index.ctp). So basically what I'm trying to do is: content from page.ctp ----> index.ctp I managed to get the content of page.ctp using below method. $.get('http://localhost/pages/10', function(data) { console.log(data); }); But based … |
Notice: Undefined index: lastid in C:\xampp\htdocs\login_test\gallery.php on line 29 and broken links $lastid = mysql_insert_id(); <img src='$row[lastid]' width='200' height='200'></img> line 29 : $row[lastid] | |
Ok.. at first I wanna try to put "include.php" on the php.. but it goes around and around.... this is the case... if ($v_name=="") $query="DELETE FROM key_show WHERE code='$v_name'"; else{ $query="insert into key_show(code) values('$v_name')"; mysql_query($query) or die(mysql_error()); } The problem here..the system keep inserting data...it shouldn't be like that yea..it … | |
iam using long blob to store my images and it works fine untill user upload huge image like 2000x2000. than i get erros like: Warning: mysql_query() [function.mysql-query]: MySQL server has gone away in C:\xampp\htdocs\login_test\upload.php on line 41 Warning: mysql_query() [function.mysql-query]: Error reading result set's header in C:\xampp\htdocs\login_test\upload.php on line 41 … | |
Hi, I am receiving emails from my form on my website however, within the email, the files does now give me the actual data, only the filed titles. Can anyone help me resolve this? Thanks in advance <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Untitled Document</title> <style type="text/css"> .back … | |
hi all, i have 3 php websites , each one requires login (same username+password for all of them) they run on apache virtual hosts on the same machine. i want to centralise login on a single page by adding 3 forms on a page so that when i click on … | |
Hello, is there a way to be sure that you not missed to test some function? I want to test lets say all posible functions, but it lot of them and you might easily miss. It would be good to get notices or something like that on which functions has … | |
Hello, today I am experimenting with unit testing functions, on codeigniter, but that does not matter, the same question is for everything in PHP, or maybe not only in PHP, but general with functions that connect to database. So lets say I have such function: public function turnview_by_franchise_id($franchises_id, $clients_id, $date_from, … | |
Hi, I have a XML file and want to put this line it but doesn't work. Is there any way of doing it? Thanks <?php header('location: goback.php'); exit; ?> | |
Hi, i'm doing a search system where you search the reference of a product and it shows a list of all results, but i have one prolem. Is that i can't do the seperation of the products by its material: $ref=$_GET['q2']; $query_prod="SELECT * FROM produtos WHERE referencia LIKE '%".$ref."%' ORDER … | |
i though repost this issue. i am trying to display image from database. but broken image shows up. and dont how why. i tried debuging like echo, mysql_error, erron, but there are no errors. get.php <?php include("connect.php"); $user_id = $_SESSION['user_id']; $image = mysql_query("SELECT * FROM image WHERE user_id = $user_id"); … | |
i have a upload.php page where user can upload images to database. now i want to create gallery.php. where who ever is loged in can view all his photos from database. here is my struct for my gallery.php file gallery.php ______________________________________ (1)at top there is going to be menu and … |
The End.