39,402 Topics

Member Avatar for
Member Avatar for cliffcc

I have the php which can import the csv files into mysql. But how to avoid the wrong data replace the data database. What is the code in php for checking before insert into the database? Thanks!

Member Avatar for vibhaJ
0
129
Member Avatar for hjames

[QUOTE=~s.o.s~;610914]> how to make div id's as unique (since it need to identify a unique div for each row) One way would be to create a separate counter (e.g. i) which would be incremented for each "for each" block and create an ID dynamically by appending the common name with …

Member Avatar for rpv_sen
0
104
Member Avatar for ebanbury

Hi First I'm really sorry if this is the wrong area to post this query, but as my pages are all in php, I thought it may have something to do with it. I have just realised that the top part of my pages flicker when you move your mouse …

Member Avatar for ebanbury
0
80
Member Avatar for zulkefli82

hi, I create a form using php+html in my website. When visitor of my website press send button, the information their key-in in the form will send directly into my inbox. The problem is, my inbox always receive spam from this.. I already delete the form to solve this problem …

Member Avatar for almostbob
0
99
Member Avatar for eduardc

Why is the serial no always 0 while I put other numbers? Php file: <html> <body> <?php $con = mysql_connect("localhost","eduardli_user","-z.x,c"); if (!$con) { die('Could not connect: ' . mysql_error()); } $description = $_POST["description"]; $price = $_POST["price"]; $quantity = $_POST["quantity"]; mysql_select_db("eduardli_company", $con) or die(mysql_error()); mysql_query ("INSERT INTO Products (description, price, quantity) …

Member Avatar for almostbob
0
139
Member Avatar for Mattshu

In the top of the first page that is requested, I make a global variable and store the value of microtime() in it. The footer of the page is require()'d at the bottom, and in the separate footer page is a code that subtracts the current microtime() from said global …

Member Avatar for diafol
0
62
Member Avatar for perohijo

Hello. Although I have seen someone else having a similar problem here, I got stuck with an error. This is the code and it shows a red parenthesis. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>JumbleMaker</title> </head> <body> <?php function DisplayError($fieldName, $errorMsg) { global $errorCount; echo …

Member Avatar for perohijo
0
157
Member Avatar for fantasma

Greetings! I'm having a problem showing a set of records using jQuery. When I click in the designated link, the script only shows the first record that comes from the database. Am I doing something wrong? Here's the code jQuery [CODE]$(document).ready(function() { //hides the slickbox as soon as the DOM …

Member Avatar for fantasma
0
121
Member Avatar for Kawaljeet Kaur

Hello to all,m kawal had rcecntly started my carrier in php so requests to help me in my projects.... I wana know how to generate a password by the admin panel itself..for ex.If if m running a company and handling admin panel,how can i generate a password to a new …

Member Avatar for CobRalf
0
110
Member Avatar for itisnot_me

ok so i am pulling my hair out here trying to figure out why php doesnt want to work right with this reg expression [B] what i am looking for [/B] {blog:name_of_blog} [B]what i have[/B] preg_match_all('\{blog:[A-Za-z0-9_]+\}', $replaced_content, $matches, PREG_SET_ORDER); [B] this is the error it is out putting[/B] Warning: preg_match_all() …

Member Avatar for itisnot_me
0
149
Member Avatar for cliffcc

I don't know how to enquiry the "informationtype" which are message and email? How to rewrite the below code? [CODE] $information = mysql_query("SELECT * FROM table WHERE informationtype='message'"); $row = mysql_fetch_assoc($information); $result=($row['informationno']); [/CODE]

Member Avatar for Stefano Mtangoo
0
82
Member Avatar for prajesh2

I'm trying to run this code but there is error message: PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource [code] <?php if (mysql_connect('localhost','root','') && mysql_select_db('guestbook')) { //echo 'connected today'; $time= time(); $errors= array(); if (isset($_POST['guestbook_name'], $_POST['guestbook_email'], $_POST['guestbook_message'])) { $guestbook_name = mysql_real_escape_string(htmlentities($_POST['guestbook_name'])); $guestbook_email = mysql_real_escape_string(htmlentities($_POST['guestbook_email'])); $guestbook_message = …

Member Avatar for Stefano Mtangoo
0
242
Member Avatar for slrobinson1983

Hello all. Can anyone show me the best way to convert a duration consisting of only minutes and seconds (such as 2:15) into all seconds (which would be 135 based on my original 2:15). Thanks in advance!

Member Avatar for slrobinson1983
0
298
Member Avatar for jeordy

I'm going a little crazy here trying to figure this out. Any help would be greatly appreciated. MySQL version: 5.0 I'm trying to make a very ugly php page used to basic queries. I have a similar page working that creates new records in the specified table, so I know …

Member Avatar for TySkby
0
148
Member Avatar for branding4you

I have problem in code for IF statement. Im looking in a mysql table if there is a field (fld_comleted) that has record with "NO" in it. If there is a record that has "NO" in it it has to do something (send email to client) if there is no …

Member Avatar for branding4you
0
114
Member Avatar for McLaren

Hi, so do I need much hacking or not if I want to make a feature where client after ordering could edit his order in virtuemart? I tried little bit google searching, but did not find tutorials or something.

0
108
Member Avatar for Kawaljeet Kaur

Hello to all,m kawal had rcecntly started my carrier in php so requests to help me in my projects....thanks

Member Avatar for jingda
0
81
Member Avatar for Hakoo

Hello Friends, I am working in JME. Now, I have situation in which, I suppose to connect with Database which has been used with PHP. So, How can I access to Mysql? As usual same as to connect mysql with JDBC? Is Mysql and Mysql in WAMP Server different? Please …

Member Avatar for smantscheff
0
200
Member Avatar for zeeya

i have chosen virtual classroom systems to be done as a project for my final year.. i would like to know the enhancements and the new features that could be added to the project so that i could try to add them into my final year project… also, please let …

Member Avatar for diafol
0
322
Member Avatar for cliffcc

As i know we can set the radio button as default buttion by using the code (checked) . how about the select button? Can i do the same thing to select button? Thanks!

Member Avatar for vibhaJ
0
216
Member Avatar for karthik_ppts
Member Avatar for karthik_ppts
-2
172
Member Avatar for Zidjan

can anybody help me about my project..i dont know how to put values in the add to cart. i already have log in page and item selections. i cannot upload my zip file here..

Member Avatar for chrishea
0
70
Member Avatar for MoreBloodWine

Code: [code]<?php $data = file_get_contents('http://support.xbox.com/en-gb/Pages/xbox-live/xbox-live-status.aspx'); preg_match_all('~<div id='xbox-live-status-box'>\s*(<div.*?</div>\s*)?(.*?)</div>~is', $data, $matches ); print_r($matches); ?> [/code] Result: Array ( [ 0 ] => Array ( ) [ 1 ] => Array ( ) [ 2 ] => Array ( ) ) I was hoping to maybe see something similar to this... trying to …

0
90
Member Avatar for johng123

i have 4 columns in the mysql database url, showingtext, target want to make a hyperlink from those columns: question: how do i automatically fill the 4th column containing the html hyperlink code question: should i rather string the 3 columns togheter using php, how would one do that sorry …

Member Avatar for johng123
0
399
Member Avatar for devinodaniel

Hey friends, I have a site that I've put a lot of time and effort into and in the midst have also been using it to learn JavaScript. I'm pretty proficient at PHP so the site was mostly coded in PHP, but now I've decided it would be best use …

Member Avatar for twiss
0
165
Member Avatar for designer2011

Just wondering if anyone can help with making all the fields on my contact form a required field. I have added the coding for the contact form php. Also will there be an adjustment to the coding for the website? Thank you in advance for your help. [CODE]<?php $field_name = …

Member Avatar for designer2011
0
116
Member Avatar for darkrunner

I've got this error `Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/siambidd/domains/siambidding.com/public_html/session.php:3) in /home/siambidd/domains/siambidding.com/public_html/session.php on line 4` I've checked my code, there is no any spaces, and I'm not using BOM as well, but still got this error. please help me here …

Member Avatar for aidant
0
144
Member Avatar for wd3bbas

[B]is Codeigniter able to protect Your Site From sql injection When You Use Active Record??[/B]

Member Avatar for McLaren
0
100
Member Avatar for McLaren

Hi, Again I am trying to do a simple thing but with joomla it is advanced. What I want to make is to show articles on front page in the way like it is in the atached picture. You can see the red bracked on the left. There is 3 …

0
114
Member Avatar for Tenaciousmug

Here is my code for the login script. Everything works perfectly, but everytime I enter everything CORRECTLY into the forum, it says "The username, ____, and password do not match!". When they do match. If I leave the areas blank, they say "You must enter a username!" or "You must …

Member Avatar for cuonic
0
95
Member Avatar for Tenaciousmug

Alright, I have a random thing going on. Works perfectly fine. This is the code: [code]<?php include("config.php"); //To change the odds, change the second number in the rand() function. $rand = floor(rand(0,1)); if($rand == 1) { $sql = "SELECT * FROM randomevents WHERE rarity <= '10'"; $result = mysqli_query($cxn, $sql); …

Member Avatar for cuonic
0
117
Member Avatar for Tenaciousmug

It's working great, but at some points after one of the random events goes through, I reload the page and it either gives me or takes away some starpoints without showing the message.. but it shows the message all the other times. Could someone help me debug this and see …

Member Avatar for cuonic
0
97
Member Avatar for oree

Hey there, I am looking to have 2 drop down lists, 1 for provinces and 1 for cities. i saw some examples in java script but since i dont know how to use java and i do know and LOVE php i wondering if anyone can help me with this …

Member Avatar for oree
0
2K
Member Avatar for umeshMCA

here i want to know that how i can do this result on client side no user can change,delete or add in this page how i will show info like this: (all values come from database) +2009 +2010 +BCA-I +BCA-II -BCA-III SAD.pdf Advance Web Application.pdf Programming in JAVA.pdf +PGDCA +M.Sc. …

Member Avatar for vibhaJ
0
91
Member Avatar for dalip_007

Guys Is there a way to export the record of a table in csv format and then send that csv as attachment in mail to anyone using php? Thanks

Member Avatar for vibhaJ
0
122
Member Avatar for 68thorby68

I have all but completed my design for an application in PHP and MySQL using apache as my web server. However, I was wondering whether apache supported transaction logging which would save me creating code with numerous database calls to log all activity myself. I appreciate I may have to …

Member Avatar for 68thorby68
0
153
Member Avatar for jakizak

Ahhhh! OK, so I've been learning PHP for about 7 years now on and off, but never have I taken the time to look into URL rewriting. Until now I've not needed it, but you can guarantee the one thing you think you wont need, you need! I have the …

Member Avatar for blocblue
0
357
Member Avatar for pallen

Hi folks, I have 2 very similar html contact forms on my site that run through PHP and get the results to the staff in an email. I use strip_tags to remove malicious content on each step of the form. Recently, a user sent an email that included some URL's. …

Member Avatar for diafol
0
158
Member Avatar for rouse

My script is dies at the start when I try to devine a SplFixedArray and I don't know how to find the error. Help would be appreciated... [CODE] <? error_reporting( E_ALL ); // Initialize the array with a fixed length $array = new SplFixedArray(5); [/CODE] Thanks! WBR

Member Avatar for rouse
0
141
Member Avatar for NinjaLink

I receive the correct results when I use Microsoft Internet Explorer. However, when I use Ubuntu and try to get the output, I receive a blank screen except for the title "Book Finder Search Results" which appears at the top. Are there any adjustments I can make, so I can …

Member Avatar for zizuno
0
202
Member Avatar for -==Zero==-

Hello My Problem May Be Very Easy Or Very Hard Iam Still Noob In Php I Developed This Site [url]http://www.e-alriyadh.com/[/url] The Pagination Works Fine In The Index Page Like This [url]http://www.e-alriyadh.com/index.php?p=2[/url] Now There's A Problem In The Category Section Pagination This Is A Section [url]http://www.e-alriyadh.com/cat.php?id=22[/url] When I Try To Go …

Member Avatar for -==Zero==-
0
139
Member Avatar for stonybony

Hi, First up, I am a little lost with events. I am trying to do this and I can almost say that its not doable: [code] "one.php" <?php echo '<input type="text" maxlength="5" name="bill" value="" /><br />'; $get_pass = 5; $get_pass1 = 10; ?> <a href="two.php?getpass=<? echo $get_pass ?>&getpass1=<? echo $get_pass1 …

Member Avatar for stonybony
0
131
Member Avatar for Bar2aYunie

Hello, I've got a MySQL db which contain addresses. I also made a script to easily add new entries to the db with a number of columns. Now, I do know how to make a script to display what's in the db... But I would like to know how to …

Member Avatar for kekkaishi
0
101
Member Avatar for johng123

its probably a simple and rather stupid question, thousands of times asked.... i have a input box (1surf.info,check out link) I would like to replace it with a dropdown , again it would need to list the countries within the table. this is how it is right now, enter state(USA) …

Member Avatar for happytogether
0
154
Member Avatar for nats01282

hello, on my website's homepage/login page im after a newsfeed like facebooks. If its your first time to the site you will view a random few post's from people, But if your a member and have signed up it will just show your friends. currently i have a function [CODE] …

Member Avatar for blocblue
0
84
Member Avatar for nats01282

i have a array which contains then numbers 1,2,3 etc... i want to connect to my mysql database and collect the information from the databse where the id column is = either 1 / 2 / 3 etc... how would i go about this?

Member Avatar for kurtopia
0
78
Member Avatar for stonybony

Hi, I have a situation that is producing NULL values: The situation is best explained with this code at this link: [CODE]http://www.daniweb.com/web-development/php/threads/227698[/CODE] Initially, I had a link called "add to list" for each record the display page displayed. I used to hide the row-id in there and pass it onto …

Member Avatar for stonybony
0
164
Member Avatar for IWDesigns

hi, i am creating a form of which will update portfolios, included is a text field...i already have blocked the usage of html and email addresses from being posted, but i cant seem to figure out how i would block website addresses? what code would i use to do this? …

Member Avatar for IWDesigns
0
350
Member Avatar for 7a26j

I have problem with this code.. my browser prints: Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\plaincart\library\database.php on line 4 [CODE]<?php ini_set('display_errors', 'On'); //ob_start("ob_gzhandler"); error_reporting(E_ALL); // start the session session_start(); // database connection config $dbHost = 'localhost'; $dbUser = 'root'; $dbPass = ''; $dbName = 'plaincart'; …

Member Avatar for chrishea
0
157
Member Avatar for astala27

[CODE]echo '<h3>Yeni Yönetici Ekleme Ekranı...</h3><br><br>'; if (isset($_POST['submit']) && $_POST['submit'] == "Kaydet"){ if ($_POST['usernname'] != "" && $_POST['password'] != "" && $_POST['first_name'] != "" && $_POST['last_name'] != "" && $_POST['email'] != "" && $_POST['TCK'] != "") { $query = "SELECT username FROM users WHERE username = '".$_POST['username']."';"; $result = mysql_query($query) or …

Member Avatar for astala27
0
342

The End.