39,326 Topics

Member Avatar for
Member Avatar for phpcake

I have website that enables user to select favourite websites, date of visiting the website, comments like how satisfied with the website they visited on that day. Initially there are four rows are hard coded and inserted into the mysql database. Then there is a add button enabling user to …

Member Avatar for lps
0
331
Member Avatar for jonlloydd

I currently have two tables in a database. One for products and one for product options. My product table allows a product to have 4 different option for example size and color etc. My options table gives each option an option ID. So for the option color - red, green, …

Member Avatar for diafol
0
176
Member Avatar for Kristiano

Hi, I have been searching and trying for days now but still cant get this to work. Id like to group my result from a SQL call into a multidimensional array. The columns that are extracted are Timestamp, room, device and value and gets sorted accordingly. As long as the …

Member Avatar for Kristiano
0
193
Member Avatar for phoenix254

I have been trying to google and find out how to make a .php script that will make a an automatic slideshow of images from a folder, I've only managed to get the pictures to automatically show up on the php page, but I can't figure out how to make …

Member Avatar for phoenix254
0
120
Member Avatar for vivosmith

<?php if (isset($_POST['submited'])) { if (isset($_FILES['upload'])) { $allowed=array('image/JPEG','application/x-bittorrrent'); if (in_array($_FILES['upload']['type'],$allowed)) { if(move_uploaded_file($_FILES['upload']['tmp_name'] , "../upload/$_FILES['upload']['tmp_name']")) { echo'Your file has been successfully uploaded!'; } else { echo'Please upload a torrent file!'; } } } if ($_FILES['upload']['error']>0){echo 'An error has occured.';} if (file_exists ($_FILES['upload']['tmp_name']) && is_file( $_FILES['upload']['tmp_name'] ) ){ unlink ($_FILES['upload']['tmp_name'] ); } …

Member Avatar for vivosmith
0
2K
Member Avatar for Niloofar24

Hi. I want to set `read more` for my cms posts. The code i found was `<?php the_content( $more_link_text , $strip_teaser ); ?> ` but still don't know how and where to use it. Any suggestion?

Member Avatar for Niloofar24
0
529
Member Avatar for anandatheerthan

I wanted to chain 3 selects and I got it working using this code. http://jsfiddle.net/FJFFJ/1/ The issue I now have is, how do I fetch the selected values from each dropdown in PHP? For example, the above creates 3 select boxes when the page is opened. When I click on …

Member Avatar for phpcake
1
4K
Member Avatar for phoenix254

HI I want to make an image slider where show user uploaded images from his directroy his directory or folder. [Image slider like this.](http://postimg.org/image/hl3pdp3mr/)

Member Avatar for phoenix254
0
4K
Member Avatar for Njegos

Hello All, We have created classified software for real estate market. We could say that software is now ready for additional niche markets. Markets that we are intend to market: car/bike, boats, pets etc Real Estate version: http://www.cubescripts.com/real-estate-script It is made in PHP and revision tracking is done through the …

Member Avatar for Njegos
0
245
Member Avatar for afaaro

Hi every one I need to retrieve categories and subcategories by category type this my data category_id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, category_parent INT(11) UNSIGNED NOT NULL DEFAULT '0', category_name VARCHAR(255) NOT NULL DEFAULT '', category_type VARCHAR(30) NOT NULL DEFAULT 'news', like News++++++ category1 category2 subcategory1 Video++++++ category3 category4 category5 …

Member Avatar for afaaro
0
356
Member Avatar for ramsiva

I want to insert into DB 000001 and 000002 and .... but inserting 1 and 2.. any body help me to solve this problem my code is $b = mysql_query("SELECT MAX(app_number) FROM tb2_payment ")or die(mysql_error()); while($row_b = mysql_fetch_array($b)){ $app_number=$row_b['MAX(app_number)']; if($app_number=="") { $app_number2=000001; } else { $app_number2=$app_number+1; } } echo $app_number2;

Member Avatar for ramsiva
0
184
Member Avatar for AntonyRayan

<?php include("connect.php"); $cat_id=$_REQUEST['cat_id']; $search_key=$_REQUEST['search_key']; if($search_key != "") { $sql=mysql_query("SELECT * FROM tbl_products WHERE title LIKE '%$search_key%' OR short_descrp LIKE '%$search_key%' OR description LIKE '%$search_key%'")or die(mysql_error()); $count=mysql_num_rows($sql); if($count > 0) { while($row_city=mysql_fetch_array($sql)) { //echo $row_city['title']."<br>"; //echo $row_city['short_descrp']; ?> <div class="section group"> <div class="city"> <div style="float:left"> <img src="images/member_posts/<?=$row_city['image1'];?>" title="<?=$row_city['title'];?>" height="100" width="160" > …

Member Avatar for jj.dcruz
0
249
Member Avatar for edbr

im sure im missing something obvious, i just cant see it any more. i had a fail on a site as i tried live, i tried to break the problem down i found the error as below with a foreach and an if condition. This is working fine on my …

Member Avatar for edbr
0
959
Member Avatar for riwakawd

I would like to know if possible to convert this to the codeigniter active record way using this->db->join etc. What's the best. It works fine with the code I got but would like to make it work with codeigniter db active records. http://www.codeigniter.com/userguide2/database/active_record.html public function get_category($category_id) { $language_id = $this->check_language(); …

Member Avatar for cereal
0
230
Member Avatar for Cemplysam

Please recommand me a good book or website where i can learn PHP Session. Actually a website will be more better thanks guys. Peace

Member Avatar for ryantroop
0
49
Member Avatar for Niloofar24

Hi. I'm working on my own CMS, i want the script to echo 3 posts in every page, and want the script to echo from the recent post and back to the oldest post. I mean like this: For example there is totaly 30 posts; First page => posts 30-29-28 …

Member Avatar for Niloofar24
0
405
Member Avatar for Nkondola

I have two tables in my database.Users table and contact table,i want to use the ID that was generated from Users table to contact table.Below is the script for Users and contact. <?php // If the values are posted, insert them into the database. if (isset($_POST['username']) && isset($_POST['password'])){ $username = …

Member Avatar for pritaeas
0
144
Member Avatar for sheelakumari

I need to draw line chart for the data present in the database, my database looks like CREATE TABLE `details` ( `id` varchar(2) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `value` varchar(5) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `details` …

Member Avatar for sheelakumari
0
277
Member Avatar for punji

hello guys i have a problem and i beg for help, i'm doing a student IS i have a result table which store students results it is named capture 3 i have developed html form accept user who add marks for a particular student these are the hmtl code <?php …

Member Avatar for coreyavis
0
2K
Member Avatar for davy_yg

Hello all, I have a question: Does anyone knows any other website besides themeforest.net to sell website? Thanks before, Davy

Member Avatar for coreyavis
0
131
Member Avatar for SoMa_2

I'm trying to determine the value of $level based on the keyword user provide using If statement but whatever was the user entry the value of $level always giving as 1 this is my code I need your help to find the error <?php $q1 = $_GET['q1']; $con = mysqli_connect("localhost","FYP","123","FYP"); …

Member Avatar for coreyavis
0
189
Member Avatar for Elvis C

Parse error: syntax error, unexpected '{' in E:\FYP\DB\TWAMPd\htdocs\web\edit_infos.php on line 58 I can't update the information page . Can someone help me? <?php include('config.php'); ?> <!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"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="<?php echo $design; ?>/style.css" rel="stylesheet" title="Style" /> <style type="text/css"> …

Member Avatar for diafol
0
150
Member Avatar for Виктор_6

Got this type of errors: Warning: mysqli_query() expects parameter 1 to be mysqli, null given in C:\OpenServer\domains\Test.loc\PHP\Shop Cart\index.php on line 7 Warning: mysqli_query() expects at least 2 parameters, 1 given in C:\OpenServer\domains\Test.loc\PHP\Shop Cart\index.php on line 8 Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in C:\OpenServer\domains\Test.loc\PHP\Shop Cart\index.php on …

Member Avatar for cereal
0
200
Member Avatar for jchimz

Hi guys I am attempting to get data entered in an HTML form through PHP then converting this data into a JSON object which will be saved on a server and retrieved to the form incase someone wants to edit entries. Please help and advice on an alternative if you …

Member Avatar for jchimz
0
387
Member Avatar for PsychicTide

Hey guys, this seems to be a thorn in my side. I've been working on scraping a website which uses aspx and has eventvalidation/viewstate inputs. Every other scraping experiment I've made was not this difficult. Maybe one of you geniuses here at Daniweb has an idea of how to solve …

Member Avatar for PsychicTide
0
903
Member Avatar for jay.barnes

What's wrong with this? $db = new mysqli("DBserver","username","password","database"); if ($db->connect_error) { die('Connect Error ('.$db->connect_errno.')'.$db->connect_error); class registerInvitedUser { protected $formdata = array(); protected $connection; protected $execute; protected $results; protected $response_code = ""; protected $response_msg = ""; public function __construct($db) { $this->connection = $db; } $this->execute = $this->connection->query("UPDATE `users` SET acctstatus= 'A' …

Member Avatar for jay.barnes
0
337
Member Avatar for lps

Actually, I am having problem with the wordpress lightbox plugin: Fancybox where it don't work. Therefore, I tried to change to jquery pirobox instead. But I having problem of add the custom rel and class to the link image. I refered [URL="http://wordpress.org/support/topic/add-relxyz-to-gallery-link"]http://wordpress.org/support/topic/add-relxyz-to-gallery-link[/URL] and tried without success moreover I want to …

Member Avatar for lps
0
303
Member Avatar for SoMa_2

I have this code to add row to my table function addRow(tableID){ var table=document.getElementById(tableID); var rowCount=table.rows.length; var row=table.insertRow(rowCount); var colCount=table.rows[0].cells.length; var cell1=row.insertCell(0); cell1.innerHTML= rowCount+1; for(var i=0;i<colCount;i++){ var newcell=row.insertCell(i+1); newcell.innerHTML=table.rows[0].cells[i+1].innerHTML; }} and this for AJAX function function CLO() { var a=document.getElementById("keyword").value; var b=document.getElementById("chapter").value; if (a == ""&& b == "") { …

Member Avatar for lps
0
373
Member Avatar for jay.barnes

Hi all I'm trying to set my mysqli connection to my database as outlined in http://php.net/manual/en/mysqli.quickstart.connections.php , with one difference - I'm trying to put my connection parameters in an include file outside of my root folder, to try to secure my DB password. $mysqli = new mysqli("DBServer", "DBUsername", "DBPassword", …

Member Avatar for jay.barnes
0
264
Member Avatar for Niloofar24

Hello friends! I want the script when user clicks the Delete botton to delete that post, a confirm message appears and ask if the user is sure to delete that post or not, if the user clicks the cancel button, nothing happen but if clicks the ok button, then the …

Member Avatar for Niloofar24
0
4K

The End.