39,326 Topics

Member Avatar for
Member Avatar for aMOEBa

I need to write a method to return the number of rows I have in my table. This code I've written so far; [code] <pre><?php class Database { private $connected=false; private $user,$pass,$host; private $db; private $result=array(); public function initialize($user, $pass, $host) { $this->user=$user; $this->pass=$pass; $this->host=$host; return $this; } function connect($dbname) …

Member Avatar for aMOEBa
0
93
Member Avatar for nabilamn

hai all. i got a problem to display a total from a few data in my database for example, in my database i got these fields: TABLE STUFF food double; clothes double; groceries double; total double; ---> should i put this in my table to save my total that will …

Member Avatar for scaiferw
0
195
Member Avatar for ayesha789

Hi, this is my file which showing result. I put check box for each result. [CODE=php]<? include("config.php"); echo "<form method=post name=myform action=b.php >"; $result=mysql_query("Select Distinct region,MaintainedBy From info"); while($ro=mysql_fetch_array($result)) { echo "<tr bgcolor=#FFFFFF style=color:#000000;>"; echo "<td>" . $ro[0] . "</td>"; echo "<td>" . $ro[1] . "</td>"; echo "<td><input name=id[] type=checkbox …

Member Avatar for ayesha789
0
133
Member Avatar for azegurb

hi there, I have taken script which fucntion as mysql connection. but there are somethings that i dont understand. does anyone can help me? Thanks in advance the code is below [CODE]function query($sql) { $link = new mysqli(DB_SERVER, DB_USER, DB_PASSWORD, DB_NAME) or die('There was a problem connecting to the database.'); …

Member Avatar for azegurb
0
107
Member Avatar for jatpatel1

Hi there, Is it possible to write description about an image without storing it in a db? I have a photo gallery and instead of using a database, I have used the dir() function to read all the files in the folder then put it in an array. It works …

Member Avatar for pzuurveen
0
101
Member Avatar for ramzmail

Is it possible insert datas of excel file [.xls] to the mysql? Not CSV file, please post me a coding...

Member Avatar for vibhaJ
0
62
Member Avatar for whiteyoh

Hi All, Ive just imported two CSV files into phpmyadmin, but i need to add an auto increment field into it, and then populate it. Any advice on how to do this would be appreciated

Member Avatar for vibhaJ
0
80
Member Avatar for wish02

Hi! Im planning to make the entries of the Ticket # links to view the ticket information. But how do i pass the value of the clicked ticket# to the next page? thanks in advance! [code=php] <?php session_start(); if(!session_is_registered(myusername)){ header("Location:main_login.php"); } ?> <html> <head> <title>Employee</title> <style type="text/css"> <!-- .tableContent { …

Member Avatar for ayesha789
0
114
Member Avatar for lonestar23

Trying to figure out how to parse the attribute value from an RSS feed which contains namespaces? Need to retrieve value "CA" from 'ac:country="CA"' in the code below. Thanks In Advance! [CODE]<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:ac="http://palm.com/app.catalog.rss.extensions"> <channel> <link>http://www.palm.com</link> <title>Device Apps for US</title> <description>Complete list of US Device channel applications …

Member Avatar for lonestar23
0
278
Member Avatar for cacoyle

this may seem a tad stupid but i've been googling for about half an hour and still no clarity - basically i have an animated gif called processing.gif i would like this gif to display in full screen for about 5 secs or so and then redirect to my home …

Member Avatar for Nahiyan
0
130
Member Avatar for wish02

Hi! I'm having problems in getting the value of the selected item and showing the items in the second dropdown. When I select a category on the first menu, the choices on the second menu appears but the selected choice doesn't show in the dropdown. And i don't get the …

Member Avatar for wish02
0
279
Member Avatar for keyroche

Hey, This is probably a newbie question, but that is somewhat what I am to PHP. I need to create a two column table within a while statement. [CODE] <?php $letter = $data['letter']; $getCats = mysql_query("SELECT * FROM categories WHERE catName LIKE '$letter%' ORDER BY catName"); while ($cat = mysql_fetch_array($getCats)) …

Member Avatar for diafol
0
193
Member Avatar for /\/\ongoose

Hello Everyone, First off I just joined the forum! I've been looking for a good web developer community to join, hopefully I have found it! Anyways, to get to the point, I am building an application for my client's website (which I also built) which will consist of a user …

Member Avatar for SerjSagan
0
96
Member Avatar for nertos

Hi, how can I hide a url from jquery/ajax code for example: [code] function func123() { $(document).ready(function(){ $.getJSON('[B]http://127.0.0.1/~nertos/file/my_web/file.php[/B]', function(res){ ...................... }); }); } [/code] Thx 4 help;)

Member Avatar for sergb
0
1K
Member Avatar for SalientAnimal

Hi Can anyone please tel me why my code is not updating my MySQL database? The code does not return any errors. It does how ever tell me that the update is successful, but there is no update. Pelase let me know should you require to view the code running …

Member Avatar for SalientAnimal
0
229
Member Avatar for ElegantElephant

Is it possible to obtain the next insert ID without actually executing a proper insert query? I am writing a file upload script but the name of the folder the file gets uploaded to depends on the next insert ID of a certain table. Would appreciate any help with this.

Member Avatar for loganphp
0
4K
Member Avatar for Pic

Hello ppl, i want to know if mysql save some text special chars like the \n i have the nl2br() function to tranform \n in to html <br>, but for BOLD or UNDELINE text ? is there a special char saved in to mysql db ? and is posible to …

Member Avatar for pritaeas
0
148
Member Avatar for bobgodwin

I have some code that I'd like to add numbers to. I'm using [iCODE]$count=o;[/iCODE] with[iCODE]++$count[/iCODE] to generate numbers. They start at "1". How do I get them to start at "0"?

Member Avatar for EvolutionFallen
0
107
Member Avatar for therest

Hi! I try to write my thumbnail creator script, no trouble with image load, resize cut, watermark, etc, but memory handling! Simple upload form used to submit file. [CODE]function makeLog($logthis) // this is only for tracking mem usage { $handler=fopen("log.txt","a"); fwrite($handler,$logthis . " \r\n"); fclose($handler); } function handleImgUpload() { $fTName=$_FILES["Filedata"]["tmp_name"]; …

0
58
Member Avatar for lf.gene

Hi all! I'm not a very good coder and i'm down here with a question for you all. Firstly, is it possible to code php within javascript? How? function confirmation() { var answer = confirm("Delete class?") if (answer){ window.location = "deleteClass.php?id=<?php echo $row['idClass'];?>"; } else{ alert("Delete unsuccessful!") } } i'm …

Member Avatar for rajarajan2017
0
223
Member Avatar for LordWEB

Hi, can someone give me idea how can I get information about namespace, class and method name and all parameters names for all public methods in class that extends MyMainClass? For example, I have script like this: [CODE] <?php require 'MyMainClass.php'; namespace myNameSpace; class MyClass extends MyMainClass { public function …

Member Avatar for LordWEB
0
90
Member Avatar for ayesha789

I can easily change settings in IE6 for printing Background Colors and Images. But How I can do same in Google Chrome. Please see attached image ...

Member Avatar for ayesha789
0
90
Member Avatar for nered

Hi, Iam not new to magento but it's my first time developing a payment gateway, extension for it. Magento is built on top of MVC framework so its extensions aka. plug-ins or modules are built this way> Block, Controller, Module. I have a sample code from the gateway provide on …

0
52
Member Avatar for mr_scooby

Just wondering if someone can give me some insight to understand how the hidden type works on a form. This form has 3 types of controls for storing the value of $id a radio button, check box and a hidden input(which has a button for each loop also). When it …

Member Avatar for mr_scooby
0
115
Member Avatar for phpDave

Hello, I created an online forum where users can post comments but when a link is posted it appears on the board in text and not as a link. Any suggestions on how to change this. I would like links that are posted to be links not just text. Thanks!

Member Avatar for almostbob
0
77
Member Avatar for fawad123

I have this data in JSON: object(stdClass)#1 (2) { ["noun"]=> object(stdClass)#2 (2) { ["syn"]=> array(59) { [0]=> string(5) "drama" [1]=> string(13) "dramatic play" [2]=> string(8) "maneuver" [3]=> string(9) "manoeuvre" [4]=> string(3) "bid" [5]=> string(12) "child's play" [6]=> string(14) "playing period" [7]=> string(14) "period of play" [8]=> string(9) "free rein" [9]=> …

Member Avatar for digital-ether
0
118
Member Avatar for ghost_from_sa

Hey guys im struggling to pass a session in php, i cant quite figure out why though. My friend used the exact same code as me but it doesnt want to work. This code is the database checker (which seems to work) maybe im over looking some thing?? [CODE]<?php session_start(); …

Member Avatar for ghost_from_sa
0
185
Member Avatar for pgmarco

Hi, I am somewhat new to PHP and MySQL and I am having a little trouble with what I want to do, which is assign a cell for each option selected and a price or insert the price into MySQL table depending on the option selected. Whichever is easier or …

Member Avatar for sergb
0
178
Member Avatar for kirtan_thakkar

I am using the code as under but always getting 0 value means the same folder [code=php] $random_folder=array("folder1","folder2","folder3"); $folder=$random_folder[rand(0,count($random_folder)-1)]; [/code] Getting folder1 always.. What's wrong?? Please Help.......

Member Avatar for msm_eg
0
157
Member Avatar for michelleradu

I have to check the google maps ranking of specific websites for given keywords. I know how to do a normal google search and look through the results, but google maps is different and my code is not working. I've been looking all over the internet for ideas and some …

0
34

The End.