39,402 Topics

Member Avatar for
Member Avatar for israillaky

I have a MySql database that uses a time field to track when the entry was inserted. Now I want to query the table for entries by a time range. I would prefer to use MySql to extract the records instead of extracting all records then iterating and comparing time …

Member Avatar for israillaky
0
727
Member Avatar for ARKaMAN

Hello, what am I doing wrong? It just errors out or posts blanks. [CODE]'$edate=implode('-', {$_POST['edate']})',[/CODE] Is the thing not working [CODE]<?php include_once 'resources/init.php'; $sql="INSERT INTO Client ( firstname, lastname, email, invoice, company, arenew, contact, wink, wint, wind, vtype, usera, yeara, sdate, edate, viprek, notes) VALUES ('$_POST[firstname]', '$_POST[lastname]', '$_POST[email]', '$_POST[invoice]', '$_POST[company]', …

Member Avatar for diafol
0
136
Member Avatar for HecGL35

Hello. I need some help in solving a php code project. I have a combo box field (months) that pulls all 12 months from a MYSQL table. The combo box is populated using php. I want to know how can I evaluate the value in the Select tag to do …

Member Avatar for diafol
0
177
Member Avatar for thedonedeal

I'm working on a Visual Basic application and would like to have it send its results (either an XML file or database rows) from the application to a database online for processing. I'm more familiar with MySQL/PHP but have no idea where to get started on with this. What I …

Member Avatar for thines01
0
116
Member Avatar for filipgothic

Can someone explina me this error on 42 I have to make Questionnaire with database so I made it like this but won't load site. here is code [CODE]<?php include 'config.php'; $err = array(); if($_POST['doAnketa'] == 'Anketa') { foreach($_POST as $key => $value) { $data[$key] = filter($value); } if(empty($err)) { …

Member Avatar for filipgothic
0
170
Member Avatar for BenzZz

Hi, The following code is working without errors: [CODE] <table> <tr> <td>Booking No.</td> <td>Driver Id</td> <td>Time Booked</td> <td>From</td> <td>Pick Up Time</td> <td>To</td> <td>No. of Passengers</td> <td>Distance</td> <td>Cost</td> </tr> <?php $stmt = $dbh->prepare("SELECT * FROM Booking WHERE cust_id = '$username' "); $stmt->execute(); while($row = $stmt->fetch(PDO::FETCH_ASSOC)){ echo "<tr><td>".$row['booking_no']."</td>". $row['driver_id']."</td>". $row['time_booked']."</td>". $row['pick_up_dest']."</td>". $row['pick_up_time']."</td>". …

Member Avatar for BenzZz
0
90
Member Avatar for microbert

Hi, I have a While Loop to display my MySQL info. This makes a list of all my data, in one row. But what I want is it to display it in a table with 5 columns so that the data is more readable. this is my code: [CODE] while …

Member Avatar for broj1
0
4K
Member Avatar for Yoong Sin Jie

I am a student , I dont know much for the php , I using the HTML ,PHP, XAMPP and MYSQL The 3 tier architecture normally are consider Model ,view and controller. For the part of controller , Normally how are you people coding , I really need help . …

Member Avatar for Yoong Sin Jie
0
285
Member Avatar for thecameraman

Hello I am trying to make a friend request system and I have it so it displays all the friend request and at the end there is a button that says "Yes" and one that says "No" I would like the Yes button to change "0" to "1" and No …

0
162
Member Avatar for Riteman

I know that php is same like HTML. I have the codings. But wondering how to execute it...? I use Dreamweaver but in vain.. i get no result.. some body pls help me.. It asks me to set a server for it. Though i set, no result obtained...!

Member Avatar for minitauros
0
203
Member Avatar for klemme

Hi, I want to get information from each session set, EXCEPT when the session name is 'navigation': So basically: Create an exception for the session called 'navigation'.. [CODE] foreach ($_SESSION as $name => $value) // $name = navn pÃ¥ session: f.eks. 1 eller 2 - $value indeholder antallet der er …

Member Avatar for pritaeas
0
924
Member Avatar for Aamit

Hi, I need some deep knowledge Regex Vs Dom. Is Regex much faster then Dom or not? Like processing speed, reliable or not . If any one share link or article it helpful for me.

Member Avatar for pritaeas
0
178
Member Avatar for PF2G

Hi, i'm doing a page where user can register and give up of a course: [CODE]<td width="5%"> </td> <td> PROGRAMAÇÃO: <br/> <?PHP $cc=$_GET['cod']; $sql_prog = "SELECT prog_curso FROM cursos WHERE cod_curso=".$cc; $query_prog = mysql_query($sql_prog, $connect); while ($row = mysql_fetch_array($query_prog)) { echo $row['prog_curso']; } ?> <br/> </td> <?PHP if(is_logged()) { ?> …

Member Avatar for pritaeas
0
152
Member Avatar for baig772

Hi all i want to check regular expression of a text field value i.e. it should not contain any '.,@' and other special characters except '_' and '-'. How can i write my rule in [code]preg_match()[/code] ?

Member Avatar for baig772
0
156
Member Avatar for subrata_ushasi

Hi all, I have a login page in localhost(website link : [url]www.csoftindia.net[/url]) . When I logged in it is showing alternate html "you are logged in as..." but when moving another page like news or other page session is lost either or it is not destroying session. Subrata

Member Avatar for baig772
0
635
Member Avatar for tamildinesh

i am used wkhtmltopdf for convert the web page to pdf. but i have a following error [CODE] **WKPDF couldn't determine CPU ("").**[/CODE] how to solve it, does any one know plz tel me how to solve it. Thank you

Member Avatar for diafol
0
110
Member Avatar for deyesborn

I am using mysql_fetch_array to fetch result from a table of my database and I want to exclude results from particular users from being fetch together with others. Example: [CODE]$result = mysql_query("SELECT * FROM users") or die(mysql_error()); echo "<table border='1' cellpadding='10'>"; echo "<tr> <th>ID</th> <th>First Name</th> <th>Last Name</th> <th>Sex</th> <th>Username</th></tr>"; …

Member Avatar for deyesborn
0
193
Member Avatar for anthonyjpv

I know that php can validate data input before querying to the database but which is more preferable by the developer or user experience? validation thru php? or validation thru javascript? whats your insight about this? thank you!

Member Avatar for anthonyjpv
0
137
Member Avatar for zidaine

hi i'm a newbie in php, plz help me with this. how can i put the value of my database to a textbox? can u give me a sample code.. thx...

Member Avatar for Persi
0
2K
Member Avatar for issaru07

i know this is a simple error but i just couldnt spot the error and i run the query seems fine. really appreciated... pleasee help Parse error: syntax error, unexpected '=' in D:\xampp\htdocs\book\admin-order-details.php on line 16 [CODE] <?php $objConnect = mysql_connect("localhost","root","boon84") or die(mysql_error()); $objDB = mysql_select_db("db-test"); $id = $_GET['id']; strSQL …

Member Avatar for issaru07
0
128
Member Avatar for elbeato

jQuery issue here. After calling some ajax, I'm having a problem getting a particular div to reload a php file. The only solution that I've come up with is to completely reload the page, but this is really undesirable, because this function is being used as part of a simple …

Member Avatar for elbeato
0
174
Member Avatar for Warl30ck

So I made a script to upload a file : [CODE]<html> <body> <form enctype="multipart/form-data" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="1000000" /> Choose a file to upload: <input name="uploaded_file" type="file" /> <input type="submit" value="Upload" /> </form> <?php include 'global.php'; //Check that we have a file if((!empty($_FILES["uploaded_file"])) && ($_FILES['uploaded_file']['error'] == 0)) { //Check …

0
105
Member Avatar for Aser Gado

After successfully creating a registering system I can't use the login system I've created, it always gives the error message I've set "Wrong Email or Password" although the values are right! The code for validating the login process: [CODE] <?php $con = mysql_connect("***","*****","****"); mysql_select_db("*****", $con); $emailin=$_POST['emailin']; $passwordin=$_POST['password']; $emailin = stripslashes($emailin); …

Member Avatar for Aser Gado
0
90
Member Avatar for azegurb

Hi all, i have taken from net script that it has curriying function which itself return function. But i dont understand why before [B]\$arg[/B] is added backslash. the same as on lines 10, 13, 19 and so on. [CODE]function add($a, $b) { return $a + $b; } $az=""; function _curry( …

Member Avatar for azegurb
0
237
Member Avatar for abe08

Hello.. I'm the newbie one. I have the file in php. I cannot solving the notice about [COLOR="Red"]Notice: Undefined index: add_item1 in C:\xampp\htdocs\guideline\xmladd_evidence.php on line 44[/COLOR] How to solving that? here my code [CODE] <html> <font size="20" face="arial" color="black"> <center><b> Add item evidence </b></center><br><hr/> </font> <form ACTION="" METHOD="POST"> <select name='add_item1[]' …

Member Avatar for simplypixie
0
99
Member Avatar for shaqib

hi, am getting the following error: Parse error: syntax error, unexpected T_STRING in C:\wamp\www\pro\Copy of procreate.php on line 268 but i am unable to find the error. here is my code <?php // Get values sent to page from user form input $space=$_POST['space']; $exten=$_POST['exten']; Echo "Writing file..."; $myFile = "$exten.cfg"; …

Member Avatar for dinhunzvi
0
461
Member Avatar for Aser Gado

Hello, how's everyone? I have created a page with a form for registration and and another php to process the registration and create the rows in the database, but the processor comes with errors. here is the PHP file: [CODE]<?php include 'dbconnect.php'; mysql_query("INSERT INTO users (firstname, lastname, email, password) VALUES …

Member Avatar for Aser Gado
0
138
Member Avatar for RazorRamon

Ok over the last several weeks i've been building a website for fun. Its basically a forum site, with topics and comments. I use queries in their basic form. Now that i'm trying to protect my site I'm getting the impression that i have to rewrite all of my code. …

Member Avatar for minitauros
0
282
Member Avatar for refresher

Does anyone would help me how dto update my shopping cart quantity please. here my php code function updateCart() { $cartId = $_POST['hidCartId']; $productId = $_POST['hidProductId']; $itemQty = $_POST['txtQty']; $numItem = count($itemQty); $numDeleted = 0; $notice = ''; for ($i = 0; $i < $itemQty; $i++) { $newQty = (int)$itemQty[$i]; …

Member Avatar for minitauros
0
3K
Member Avatar for ankitsuhail

hi i humbly need some help. I am a php developer but now I am learning asp.net with c# as it is a requirement of our company. I am familiar with the basics of c# and oops. The problem i am facing is that i learned how to retrieve values …

Member Avatar for mani-hellboy
-1
195
Member Avatar for tibormarias

Hello everyone! I am having a problem. I receive an error below. Parse error: syntax error, unexpected ')', expecting '(' in /home/fundis/public_html/ww.incs/basics.php on line 27 Here is my 'basics.php'. [CODE] <?php session_start(); function __autoload($name) { require $name . '.php'; } function dbInit(){ if(isset($GLOBALS['db']))return $GLOBALS['db']; global $DBVARS; $db=new PDO('mysql:host='.$DBVARS['hostname'] .';dbname='.$DBVARS['db_name'], $DBVARS['username'], …

Member Avatar for broj1
0
181
Member Avatar for zrony

hello everybody i want to update my edit panel in which file uploader is include.i want that when i click on edit button of specific id then all control fetched their value from database but my fileupload not fetch value from database then after it i want to upload this …

Member Avatar for pzuurveen
0
84
Member Avatar for davy_yg

Hi, I just installed wordpress custom themes to my wordpress page then this error appears when open the admin page. On top of the admin page. Why is it ? Warning: Cannot modify header information - headers already sent by (output started at /home/ocklaw5/public_html/new/wp-content/themes/ocklaw/functions.php:2) in /home/ocklaw5/public_html/new/wp-includes/functions.php on line 861 Warning: …

Member Avatar for pritaeas
0
148
Member Avatar for nova37

[CODE] <?php // Duplicate entries remover from database // task :: load url check if more than 2 entries exists replace it with new entry session_start(); // no time limit set_time_limit(0); // connect to db include ("config.php"); // select data from database target woth and domain table $result = mysql_query( …

Member Avatar for nova37
0
305
Member Avatar for kamilacbe

Hii.. Am a C# and ASP.net fan..now have a plan of learning PHP..So experts can you help me out where to start .....i have dreamweaver and Xamp ..Is this good enough or do i need to go for anyother IDE like cakephp ..Zend etc....can anyone guide.....

Member Avatar for kamilacbe
0
116
Member Avatar for sidra 100

hi n working with a code but m facing a problem of undefined index. i have seen it occurs due to unavailablity of data or like that but here i m declaring that data jst before its use. rest of variable are working correctly just SESS_dept is giving error plz …

Member Avatar for charlybones
0
171
Member Avatar for anthonyjpv

I want to be able to insert and update 2 different tables at the same time heres the scenario: if i insert a new record, the it will create a primary key for me as auto increment then once that primary key is created, I want to use that to …

Member Avatar for baig772
0
92
Member Avatar for rudevils

Hi all, glad to write here again, i need all your help :) Does anyone knows or have simple online booking system that can attach in a wordpress blog. This plugin let user choose check in date and check out date to check room availability.

Member Avatar for zwieciu
0
227
Member Avatar for tahirkhanafridi

Hello i m developing admin panel for my project i want to add new records when i fill out the form and hit the add button its redirect me a error message i dont know how to ride on this error please help thanks! The error is Insert failureColumn count …

Member Avatar for tahirkhanafridi
0
136
Member Avatar for issaru07

i got this error when i trying to submit a form.. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order(firstname,lastname,email,address,city,postalcode,country,totalprice,paymen' at line 1 appreciate if you could assist me.. [CODE] $sql2= mysql_query("INSERT INTO …

Member Avatar for diafol
0
171
Member Avatar for issaru07

i have to run 2 queries for inserting 2 different tables userorder table contains orderid , title order_details containts orderid, qty so how can i get orderid for my order_details? the code below donts seems able to get last orderid [CODE] $query = mysql_query("SELECT last_insert_id()"); list($oid)=mysql_fetch_row($query); [/CODE]

Member Avatar for issaru07
0
148
Member Avatar for riseguim

Hi guys, I simply need to add an exception to this directory listing coding so .php files aren't visible. Do any of you know how to do that? Thanks!! [CODE]<?php // open this directory $myDirectory = opendir("."); // get each entry while($entryName = readdir($myDirectory)) { $dirArray[] = $entryName; } // …

Member Avatar for riseguim
0
4K
Member Avatar for Z33shan

hello :) it's been more than 4 days, i had been searching for php client library for facebook app development. all libraries, that i find, are outdated, (not supported by facebook anymore) and i get "undefined function........" error. so where can i get the latest php client library for facebook …

Member Avatar for pritaeas
0
140
Member Avatar for Warl30ck

I was working on this script which let's you upload and everything is logged in the database. I got this error, any help? Error :You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/home/a6771073/public_html/upload/img.png)' …

Member Avatar for dos_killer
0
116
Member Avatar for riseguim

Hi guys, ok so here's the deal: currently I have this PHP code that allows someone to see every files that are in the directory. I would also like for them to be able to delete any files he wants. Here's my PHP code: [CODE] <?php // open this directory …

Member Avatar for riseguim
0
695
Member Avatar for davy_yg

Hi I would like to create drop scroll show content, how to do so ? v Fiat Justitia Ruat Caelum Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer eros risus, vulputate vel iaculis vel, luctus ac arcu. Vestibulum metus ligula, dignissim nec viverra a, interdum ut magna. Donec dignissim …

Member Avatar for pritaeas
0
479
Member Avatar for wwefriend

hello everyone...I wan to add if else statement like for below code if the kilogram field input=0 then [CODE]'item_subtotal' => $item->item_qty * $item->item_price, 'item_total' => $item->item_qty * $item->item_price[/CODE] [CODE]$db_array = array( 'invoice_item_id' => $item->invoice_item_id, 'item_subtotal' => $item->item_qty * $item->kilogram * $item->item_price, 'item_tax' => '0.00', 'item_total' => $item->item_qty * $item->kilogram * …

Member Avatar for cereal
0
92
Member Avatar for vijaykavin10

Hi While i am using IMAP protocol to download mails from the Gmail.Some of the mails are skipped(Not downloaded) any ideas would be appreciated...

Member Avatar for pritaeas
0
163
Member Avatar for zrony

hello i want help all of you that i had made searching php page and my page working well.but i face a problem that when i search for example ssc recruitment in delhi then it not placed top after searching but it should be on top rank then after it( …

Member Avatar for cereal
0
86
Member Avatar for azegurb

Hi all, I have taken from net chained select script. here is all PHP and Javascript files but i dont understand one thing there. index.php file [ICODE]<?php include('db.php'); include('func.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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Chained Select Boxes using …

Member Avatar for azegurb
0
239

The End.