39,323 Topics
| |
category_manager.php [CODE] <?php //LOAD USER $result = mysql_query("SELECT * FROM kategori_berita"); while ($data = mysql_fetch_array($result)){ ?> <tr> <td><?php echo $data['kategori'];?></td> <td> <a href="./category_manager.php?id=<?php echo $data['id']; ?>&mode=delete">Hapus</a> | <a href="./category_manager.php?id=<?php echo $data['id']; ?>&mode=edit">Edit</a> </td> </tr> <?php [/CODE] Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\php_template2\category_manager.php on line … | |
I have the following codes: [CODE] <?php class LongName { var $firstname = " "; var $middlename = " "; var $lastname = " "; function firstname() { echo "First Name : ". $this -> firstname; } function middlename() { if (middlename){ echo "Middle Name : ". $this -> middlename; … | |
I want to display the URL of a page using PHP. Basically do this: <script language="javascript"> document.writeln(document.location); </script> with PHP | |
Hello, I have been learning php stuff for the last few days. Recently, I have learned how to allow user registration, and I have made this simple voting code that allows people to "like" or "upvote" something on my site. The way the site is set up is there is … | |
I have a page on my testing site where users can post news. The posting page has a title, link, and body. The link can be left optional. I wanted the page to turn out that if a link was provided, it would make an <a> tag around the title, … | |
i have a smile function i want a simple add on it i want to set the limit for replace codes with smiles function smiles($shout){ //This function searches the shout for the smilies and replaces it with the image code. $FileName="lists/smiles.php"; $list = file ($FileName); foreach ($list as $value) { … | |
Hi, My name is Max and I am 14. I need to show warning first time my site is visited. (like SNIP the first time you visit it shows a warning, the seconds time it just takes you to the site, my uncles friends site) Does anyone know a simple … | |
Suppose I have a PHP SESSION script, which can load in my friend PC but not run into my PC. Code is same and code running a single server machine! What could be possible reasons? HELP me! | |
Hello seniors, How are you….? I need your help to remove little logical error form user registration form. I have created a user login & registration form. It works fine when I try to reach that form by this method First I put this address in address bar [COLOR="Red"]http://localhost/series/[/COLOR] After … | |
I am using pagination with search option. Pagination is working perfectly, when I searched and click submit button the no. of records and pagination are showing correctly on first page and pagination. But when I click on next page it will show all records ( means default query) <?php if(isset($_POST['Submit1']) … | |
[CODE] <?php // connect to database $con = mysql_connect('localhost', 'root', ''); if (!$con) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully <br>'; $db_selected = mysql_select_db("template", $con); if (!$db_selected) { die ("Can't use template : " . mysql_error()); } else echo 'database connected <br>'; mysql_close($con); //LOAD USER $result … | |
Hi, i am just adding the last component to my registration page, but i am having a little trouble with it. Basically my website includes a referal based system, wherebye when the user signs up they can add a referal that benefits the referal later on. The code i am … | |
I need complete code that have two jquery date picker for two text-boxes. | |
hi all, i have two three dimensional array like this [CODE] $array1 =Array ( [0]= array ( [0]=array ( [name]= praveen [id] = 20 ) [1]=array ( [name]= kumar [id] = 25 ) ) ) $array2 =Array ( [0]= array ( [0]=array ( [name]= pandu [id] = 21 ) [1]=array … | |
Hi all, I have this code that seems to work fine for the order but cant get it to pass the invoice side of things. the trouble im having is when i do the order its fine, but when i do an invoice it sends me back to the order … | |
Is there any way to execute a wordpress plugin's call tag [CODE][pluginname=parameters] [/CODE] from custom fields? Actually I'm trying with a function and then calling it from the template: [CODE]<?php if ( function_exists('get_custom_field_value') ){ get_custom_field_value('my custom field', true); } ?>[/CODE] but my result is the plugin call tag [CODE][pluginname=parameters][/CODE] . … | |
Hi There, I would like to know if it's possible to use or what I could use to get the required results. The values [code] +2711 081 076 086 080 9011 6547082 9013 9039 9086 9041 +27084 substring(table,length(tbl_code),length(tbl_code))=trim(tbl_code) [/code] I have different values lengths in my MySQL table that's not … | |
[CODE]<?php $myServer = "202.138.125.155"; $myUser = "micro_fms"; $myPass = "micro_fms*#$"; $myDB = "micro_fms"; //create an instance of the ADO connection object $conn = new COM("ADODB.Connection")or die("Cannot start ADO"); //define connection string, specify database driver $connStr = "PROVIDER='SQLOLEDB'; SERVER=".$myServer.";UID=".$myUser.";PWD=".$myPass.";DATABASE=".$myDB; //Open the connection to the database $conn->open($connStr); //$table_name=$_GET['Device']; $table_data=$_GET['Data']; $data=(explode(",",$table_data)); $table_name=$data[0]; $speed=$data[1]; … | |
i have dreamwever cs4 and wamp 2.1 . to practice php programs i need to connect dreamwever cs4 to wamp 2.1. how can i connect? please any one tell me step by step instruction. | |
Hi, Can someone give an example how the following task can be achieved smartly? I have this Database Table with 2 fields [B]1. Brand_ID 2. Brand_Name[/B] [B]SQL[/B] = SELECT Brand_ID, Brand_Name from brands limit 0,12; and I have to loop through it and place the values in the following HTML … | |
hi .. i need help .. i'm making a login page with sign-up feature .. meaning if you are not already registered in the database you have to sign-up on the sign-up page .. i know how to make the pages but my only problem is .. how can i … | |
Ok, so I wondered if it was possible to create some kind of form with text boxes or something, and make whatever's in them be stored in variable (ie. $title) and then insert those values into a template on a new .php-page with the variables. I don't know if this … | |
Hi all. As a hobby I've been working on making a website with PHP and MySQL, both of which I am new to. I'm having some trouble with the comments system as I can't seem to be able to insert a date into the database. After the "insert", when I … | |
Hi friend, i have 2 files 1. ft.php and 2. inf.php [B] this is ft.php[/B] [CODE] <script type="text/javascript"> function setTXT(x) { opener.document.fmain.mms.value=x; window.close() } </script> <? include_once "conf.php"; $sql="select id,pl,inf from det_pl"; $data=mysql_query($sql); ?> <br> <table width="100%"> <tr> <td align='center' class="headlist" >no</td> <td align='center' class="headlist" <?=$colspan?> >code</td> <td align='center' class="headlist" … | |
hi all, i have a problem with multiline json file that i wish to insert into an sql db. my problem arose as i went from one data set to two in the JSON file. the one data set was sucked from the json file to the sql db via … | |
this is the problem- my program is linked to another website. we arranged that the website would have a link to my program and pass along a parameter that holds an X value. I have many scripts and some of them need to use that value and some don't..so I'm … | |
how to update single row from table by using a single sql query. here im using library system.when a book is issued to the user,it should be updated to database, only which book is issued | |
Ok so my problem is I need to create a Page that a user can register on and also a log in page as well. The information i want to take in on the register page is: First Name Last Name email confirm email sex d of birth. and a … | |
I found an online tutorial at this website how to create an online calendar [url]http://davidwalsh.name/php-calendar[/url] [url]http://davidwalsh.name/php-calendar-controls[/url] In comments to the website several people showed how to highlight the current day it worked for them how some but does not for me I tried the following codings Code 1: [CODE=php] //Change … | |
I am looking to create a desktop application in C# which : 1. Allows the user to select a file / multiple files / folder containing files from his computer. 2. Upload the files selected to a PHP script (which is already equipped to handle file uploads using the $_FILES … |
The End.