39,323 Topics

Member Avatar for
Member Avatar for jcruz900

I'm having trouble sorting my column tables. When a title of a column is clicked, it is sorted alphabetically or by number smallest to biggest. I'm also having trouble formatting the date (Born and Died dates). Currently it looks like this YYYY-MM-DD. I need it to look like this MM-DD-YYYY. …

Member Avatar for cwarn23
0
171
Member Avatar for jetlife76

Ok i am trying to create a simple program that will allow me to use an array with 8 numbers, the output form should show the numbers in their original order that the user inputs them, in numerical order, Highest number, lowest number and then the average number. If anyone …

Member Avatar for Stefano Mtangoo
0
141
Member Avatar for dr.4030

Hi, this is my page which is displaying the products that i inserted inside my database tables for example this is for one of them that named table1 : [CODE]<table width="850" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <?php include "../db.php"; ?> <?php error_reporting(0); //Rows $imgRow = '<tr>'; $idRow = '<tr>'; …

Member Avatar for divyakrishnan
-1
69
Member Avatar for virtuali

Hi All, I am trying to create a form using sessions so that the submit button is only submitted once in a two minute duration. I need the form to still complete the onclick action so that a calculation happens, but I only want the mail() function to send an …

Member Avatar for Stefano Mtangoo
0
298
Member Avatar for bangla

[CODE]<?php $con = mysql_connect("bangla123.db.8390659.hostedresource.com","bangla123","Algnab123%"); if (!$con) { die('Could not connect: ' . mysql_error()); } if (mysql_query("CREATE DATABASE tryDB",$con)) { echo "Database created"; } else { echo "Error creating database: " . mysql_error(); } mysql_close($con); ?> [/CODE] ------------ When I run the code, i get error -"Error creating database:.... Pls advise. …

Member Avatar for divyakrishnan
0
72
Member Avatar for Lindsie

[B]I am a newbie so please be kind.[/B] I have put together a form using multiple queries which pulls information from MySQL tables that are joined by ID number. It displays the info in a form so updates can be made. I cannot get it to update more than one …

0
102
Member Avatar for geneh23

Hey everyone, I am fairly new to the programming world, but I am a quick learner. I am trying to make my "membership area" register.php work properly, but there seems to be a parsing error as follows here: "[B]Parse error: syntax error, unexpected T_VARIABLE in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\register.php on line …

Member Avatar for momo219
0
708
Member Avatar for asif49

Below is how the database is searched. [CODE] $query = "SELECT * FROM $tbl WHERE content LIKE \"%$var%\""; [/CODE] $var includes the term or phrase searched for. But using the "LIKE" in the query doesn't seem to ignore whitespace or hyphens or commas (like i want it to) E.g. if …

Member Avatar for asif49
0
115
Member Avatar for Behseini

Hi guys I tried to Google this but unfortunately I couldn't find any thing, Can you please let me know how I can populate a drop-down list from a csv file using php? For example let say I have a csv file(league.csv) like this: Man City,9,25 Man Utd,9,20 Chelsea,9,19 Newcastle,9,19 …

Member Avatar for pritaeas
0
800
Member Avatar for asif49

At work, I was given a file with which to connect to the proxy which I can do from there but I have no idea how to do it from home. I tried going "under the hood" and setting up a proxy with a random www address but that didn't …

Member Avatar for asif49
0
210
Member Avatar for BenzZz

I'm designing and implementing a PHP web application as part of final year university project and i was wondering if any of you could suggest any development methodologies that i could follow and your reasons for them, as i haven't ever created a full web application. I also need to …

Member Avatar for BenzZz
0
280
Member Avatar for tgr0ss83

I get the following Error from the code below: Warning: require_once(JS/Extractor.php) [function.require-once]: failed to open stream: No such file or directory in C:\Users\gross.t\Desktop\choicegrid\jsextractor.php on line 12 Fatal error: require_once() [function.require]: Failed opening required 'JS/Extractor.php' (include_path='.;C:\Users\gross.t\Downloads\pear\;/library/') in C:\Users\gross.t\Desktop\choicegrid\jsextractor.php on line 12 [code]<?php $path = '/library/'; set_include_path(get_include_path() . PATH_SEPARATOR . $path); require_once …

0
118
Member Avatar for asif49

This code seems to work on a simpler level but not on the one I'm trying to use. It's for a website's search engine. First the result is gotten from the database like so: [CODE] $query = "select * from $tbl_name where name like \"%$var%\" OR text like \"%$var%\""; $numresults=mysql_query($query); …

Member Avatar for the_traveller
0
101
Member Avatar for deleted1234

I have 3 tables. [CODE]product ----------------------------------------------- product_code | product_header ----------------------------------------------- 12345 | Wilson Pro-staff Grip plus Glove product_attribute --------------------------- product_code | attribute_id --------------------------- 12345 | 1 12345 | 2 product_attribute_types ----------------------------- attribute_id | attribute_name ----------------------------- 1 | Size 2 | Colour[/CODE] This is the output that I would like to …

Member Avatar for ddymacek
0
269
Member Avatar for deucalion0

So I have Microsoft SQL Server 2008 R2 installed and an instance set up with a database an user setup on that database with a password. I have installed PHP, and IIS and got PH working from the WWWROOT folder, but when tryng to connect to my database it is …

Member Avatar for Biiim
0
276
Member Avatar for stupid guy

hi , I m newbee to dreamviewer CS4 and php.i have installed xampp and php my sql works fine. Now when i select a new PHP layout and insert<p>The time is now <?php echo date('H:i:s'); ?>.</p> in body section i don't get to see any date in live view.I have …

Member Avatar for Danny159
0
142
Member Avatar for dr.4030

Hi, i wanna put some editor with HTML plugins that i can insert my html or php or any other codes inside my pages just like daniweb editor is there any body to help me ??

Member Avatar for ddymacek
0
61
Member Avatar for mayreeh

how do i get total values in a row by grouping into diffrent categories. here is my code bt its getting oll totals in a row for now.. [CODE]<?php require_once('connect.php'); ?> <?php $query="Select Amountspent from Moneyout"; $result=mysql_query($query); $total=0; while($row=mysql_fetch_array($result)) { $total=$total + $row['Amountspent']; } echo "Total is:" . $total; ?>[/CODE] …

Member Avatar for mayreeh
0
168
Member Avatar for erik216

I have two array. How to check different and correct the order in a new array? EG. Array_a 0 => 1 1 => 2 2 => 3 3 => 4 4 => 5 Array_b 0 => 1 1 => 2 2 => 3 3 => 3 4 => 5 You …

Member Avatar for Biiim
0
175
Member Avatar for mt2009

I heard the best method to share session across multiple domains on same server is to use custom php session handler. (ie, domain name different like abc.com, xyz.com but single application.) But after i tried it, even custom php session handler that using SAME DATABASE ON 1 SERVER can't share …

Member Avatar for tolinho
0
741
Member Avatar for P0lT10n

Hello all community again ! I only want to know what is faster and better (logical, not writing or tabbing) between: IF...ELSE...IF...ELSE... IF...ELSEIF...ELSEIF...ELSE... For example: [CODE=PHP] $i=0; if($i>5){ echo '$i is greater than 5.'; }else{ if($i>0){ echo '$i is greater than 0 but less than 6.'; }else{ echo '$i is …

Member Avatar for almostbob
0
136
Member Avatar for ak1200

I am not that good with PHP and have a question for you. I use text area which is tied up to a javascript text editor (turns the text area into simple text editor) and for example I type : 1. Course one 2. Course 2 Then it will save …

Member Avatar for chrishea
-1
173
Member Avatar for Amr87

Hello Everyone, I`m a PHP developer, These days I`m thinking seriously about learning ruby , but I`m not sure if it gonna add to my knowledge , so i have few questions about it and hope that a ruby specialist will answer me 1- Do I need to learn ruby …

Member Avatar for Amr87
0
370
Member Avatar for Netsurfers

I searched daniweb, google, etc. All had multible code snippets but I couldnt get any to work.. Well my database is "wallet" and in the row is "id" and "amount" So I tried like [CODE]$result = mysql_query("SELECT amount FROM wallet WHERE id LIKE '%$id%'"); while ($row = mysql_fetch_assoc($result)) { $money …

Member Avatar for Netsurfers
0
145
Member Avatar for P0lT10n

Hello all Community ! My question is very simple: What is the difference between [ICODE]$_SESSION['id'][/ICODE] and [ICODE]$_SESSION[id][/ICODE] ? Both works the same ! What is better ? Does anyone know which is faster ? Thanks all ;) !

Member Avatar for P0lT10n
0
112
Member Avatar for baig772

hi all i am new to kohana i am getting the following error "Fatal error: Cannot redeclare class Session_Core in C:\xampp\htdocs\admin\system\libraries\Session.php on line 12" plz help me to correct it i am in a big trouble

0
70
Member Avatar for samad

this is my code and below are the notices that r shown in browser ..what can i do?? [CODE] FILE 1: new_user.php <?php require('header.php'); ?> <body> <?php require('sql_connect.php'); ?> <?php require('functions.php'); ?> <form method="POST" action="add_new_user.php"> Username: <input type="text" name="user_name" /></br> firstname: <input type="text" name="first_name" /></br> lastname: <input type="text" name="last_name" /></br> …

Member Avatar for Shamrocks
0
174
Member Avatar for dr.4030

Hi, i created a page with some radio buttons that each of them contains a certain number which i send them to action page for searching among the numbers that i inserted inside my table in data base. but the question is here that i wanna select with some different …

Member Avatar for dr.4030
0
121
Member Avatar for Buppy

Hi, A little stuck here - i have a file containing info like this: Name: Some Name Email: [email]some@email.com[/email] I'm using file_get_contents to read the file and then i want to get the name. I have it like [CODE]preg_match('/Name:(.*?) Email:/',$filecont,$name);[/CODE] however it returns nothing. Maybe anyone has an idea how …

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for JamesPublic

Hi all, I'm decoding a JSON object into an array and then inserting it into a database, which informs markers on a google map. That step is working fine, but I'm now trying to insert code to (a) read whether the latitude value in the array is null, (b) send …

Member Avatar for JamesPublic
0
700

The End.