39,326 Topics

Member Avatar for
Member Avatar for 1stoptutorials

Hey Everyone hope all well. I have this code that works perfectly on a mysql database [CODE]<?php // visit http://php.net/pdo for more details // start error handling try { // connect $pdo = new PDO('mysql:host=localhost;dbname=name', 'name', 'password'); // enable error handling through exceptions $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // create safe query $query …

Member Avatar for mlesniak
0
292
Member Avatar for ale89

Hi all! I'm making an admin, with gallery of photos. What I am doing is to first create the name of a main photo portfolio with a folder with the name entered and stored within the image that rose. When ready all the portfolios which are the folders with the …

Member Avatar for ale89
0
93
Member Avatar for lastgame2007

im trying to concatinate my birthdate dropdown MM,DD,YY in Textbox.. it wont save, please help me with my code.... [CODE] <p class="studmen">Birthdate<input name="bdate" type="text" value="<?php echo $bday=$mm.$dd.$yy;?>"/> <select name="<?php $mm;?>"> <option value=""></option> <option>Jan</option> </select> <select name="<?php $dd;?>" > <option value=""></option> <option>1</option> </select> <select name="<?php $yy;?>"> <option value="" ></option> <option>1990</option> [/CODE]

Member Avatar for diafol
0
54
Member Avatar for leechyeah

Dear, I am new to PHP and MySQL. I have a simple order form on my site: 1 column with "member" and one with "comment". I am able to Insert rows when a user submits the form. But when a user wants to modify that data, the form inserts another …

Member Avatar for leechyeah
0
213
Member Avatar for aaloo

this is my html code in which i want to get info from the server and insert it into the list items and show it in the browser, using loop .so i am using php but this code is not working for me . please somebody help me !!!!!!!!![CODE]<body> <div …

Member Avatar for aaloo
0
167
Member Avatar for shamsidah

hello... i have a question about my final year project.. in my database i want to find 5 maximum values from total of defects from car's body... and the data that i'm found must valid for one year, and after one year (next year) maybe the 5 max values may …

Member Avatar for diafol
0
87
Member Avatar for lagoni123

Hey Daniweb, can somebody explain to my how to call a value from my database after i logged in? Like i log in with the username and password, then i want on my member page to show what email this user has or any other thing from the database. What …

Member Avatar for diafol
0
138
Member Avatar for masterjiraya

I wanna try my self as an experience. Scenario: I have a member join and member log-in wherein the pass word is encrypted in the database (MySQL) Now let's say he forgot the password it too lazy to just open your email account for just getting the password recovery. What …

Member Avatar for cereal
0
197
Member Avatar for BenzZz

I create the session variable $_SESSION['SESS_MEM_ID'] within my validateLogin.php file shown here: [CODE] <?php include'db_config.inc'; require_once('InitDB.php'); $error_msg = ''; $error_flag = false; function clean($str) { $str = @trim($str); if(get_magic_quotes_gpc()) { $str = stripslashes($str); } return mysql_real_escape_string($str); } try { $dbh = new PDO("mysql:host=127.0.0.1;dbname=$db", $user, $password); } catch (PDOException $e) { …

Member Avatar for BenzZz
0
1K
Member Avatar for ishlux

Hi all, I have an inbox, if i click on the inbox which will display list of mails. now i have next button, if i click on the next button it should be possible to display the next mail with respect to the current opened mail. how to do this …

Member Avatar for its4enjoy
0
117
Member Avatar for rse

Hello, in process.php, I am trying to display google chart by requesting it using streams, the follwoing code is for requesting the chart: [code=php] header('content-type: image/png'); $url = 'https://chart.googleapis.com/chart?chid=' . md5(uniqid(rand(), true)); $chd = 't:'; for ($i = 0; $i < 150; ++$i) { $data = rand(0, 100000); $chd .= …

Member Avatar for kevindougans
0
999
Member Avatar for rajeesh_rsn

Hi I added a addslash before submit to database like [CODE]$bio=addslashes($_POST('bio'));[/CODE] it will add a "'" before submit .. and everything working fine .. but at the time of edit/ resubmit this form I am getting the following out put [CODE]This is old\' Line This is new' Line[/CODE] Please help …

Member Avatar for hakeemtunde
0
124
Member Avatar for sacarias40

I have a project im working on that includes an activity stream. I'm working in php and MongoDb (noSql). The site can post articles, users can promote articles or add them to favorites. How may i include these in an activity stream similar to facebook or twitter? Example: Josh, john, …

Member Avatar for diafol
0
85
Member Avatar for vishi96

Hello I'm a PHP beginner, and I was looking for the best resource online for learning PHP, and also do recommend certain books for the same. Thanks

Member Avatar for pritaeas
0
517
Member Avatar for akshayphp

I am basically creating a registration page. Tell me where I am wrong in this code. [CODE] <?php session_start();session_destroy(); session_start(); if($_POST["regfname"] && $_POST["reglname"] && $_POST["regcname"] && $_POST["regemail"] && $_POST["regphone"] && $_POST["regwebsite"]) { if($_POST["regpass"]==$_POST["regcpass"]) { $servername="localhost"; $username="akshay"; $conn= mysql_connect($servername,$username)or die(mysql_error()); mysql_select_db("akshay",$conn); $sql="INSERT INTO acts(fname,lname,cname,email,phone,website,password)values('$_POST[regfname]','$_POST[reglname]','$_POST[regcname]','$_POST[regemail]','$_POST[regphone]','$_POST[regwebsite]','$_POST[regpass]'); $result=mysql_query($sql,$conn) or die(mysql_error()); print "<h1>you have registered …

Member Avatar for hakeemtunde
0
272
Member Avatar for rajeesh_rsn

Hi friends , In one of my web portal there are more than 1000 users . I need a news letter for every week for all these users ... My system ( web account ) crashed when I tried with a for loop . Can you please suggest me a …

Member Avatar for kevindougans
0
105
Member Avatar for Viruthagiri

I'm using cubepoints. It has a module named "paid content". Paid content module hides the post content. User need to pay "X" points to view the page. But this module only hides main content. I mean it hides the content whatever "the_content" loop calls. Here is my problem. I'm using …

0
80
Member Avatar for Giggaman

Trying to set-up a simple email script. Every customer must have a login with an email address. If a potential client wants to email that user, I don't want their email posted where others can see it. So my question is how to I query an email address from the …

Member Avatar for diafol
0
64
Member Avatar for jetlife76

I have a program that simulates the Powerball Lottery game, i have been working on it for weeks now. My issue is with the quick pick option. when the quick pick numbers match the winning numbers it doesn't show the matches. If the user enters the numbers manually it does. …

Member Avatar for jetlife76
0
326
Member Avatar for stereoworld

Hi Guys, Hope you can help me with this little conundrum I'm having currently. My company has a dedicated windows server with heart internet and for means of database interaction, we've been forced to move one of our php sites to there. Everythings great and works fine - except the …

Member Avatar for stereoworld
0
1K
Member Avatar for jacob21

I am using TinyMCE textarea. Which will be formatted text How I can insert that formatted text into table (database) as well as print value that I have inserted (formatted text) ? [CODE] mysql_query("insert into emailtemplates (name, messagebody, status) values('".$_POST['frmname']."', '".$_POST['content']."', $status)") [/CODE] [B]where $_POST['content'] is my textarea[/B]

Member Avatar for stoopkid
0
230
Member Avatar for monzu123

Hi, I am new to PHP and looking for a help to develop below idea with PHP, MySql and Jquery. [IMG]http://i39.tinypic.com/2cy2xdu.jpg[/IMG] I want to populate matched people number from database according to dropdown slections. Please check above image to understand what i am talking about. Any help is very much …

Member Avatar for broj1
0
70
Member Avatar for polinolin

hi mate. i have problem about REGEX this is my simple code [CODE]<?php $teks="hi whats up? how are you?"; $replace=preg_replace("/(you)/i",'<span style="background:yellow;">\1</span>',$teks); echo "$replace"; ?>[/CODE] what the mean \1 ? its not give effect for my text.. if i change the value to \2, the text has change.. thanks mate!

Member Avatar for diafol
0
84
Member Avatar for Psyho

Hello all. I have a bit of a problem. I have a few php pages all encoded utf-8. A MySQL database, where it is possible to have characters like: 'á'é'ú'ő'ü' and so on, i have set with phpmyadmin to be utf8_hungarian_ci character encoding. Funny thing is, that when I write …

Member Avatar for diafol
0
303
Member Avatar for dan420

Hello, I have a table with 10 rows. each row has 3 columns. column1 is product name column2 is a drop down box with values from 1to10. column3 is a check box. When the checkbox is checked I would like to get the entire row value (product name, quantity) Can …

Member Avatar for diafol
0
168
Member Avatar for mana_panigrahi

Hi, I am trying to call a function by "onclick" event of the button. When I do that it shows error message. Can anybody help me out on this so that when I click on the button it should call the function and execute it. My code looks like: -------------------------- …

Member Avatar for john_lane
0
14K
Member Avatar for Aamit

Hi, I am trying to upload file and save data to DB. IN File only 10 row and 5 column data.(normal sample data) File has only 24.0 KB (24,576 bytes) I am using..reader.php and oleread.php to upload file But It taking More than 650MB memory (681574400 bytes) Is any [B]other …

Member Avatar for diafol
0
159
Member Avatar for harsha.netpem

Hi, I want to select multiple option using check boxes(all values of checkboxes are come from database 1 ) and insert into the particular table in other database using php form.

Member Avatar for diafol
0
221
Member Avatar for jerrinfive

i have two tables in a single database sales... one is product other is order... i want someones help to know how can i do one operation.... i.e when i click on order i want to subtract that one order from the product table.... can u help me with the …

Member Avatar for qazplm114477
0
117
Member Avatar for djbrown

As a newbie at 63, I have learned how to build an SQL database from scratch, interrogate it and present results, but I just cannot wrap my bhead around the following issue. I am in the process of constructing a site that will return a list of suppliers to a …

Member Avatar for diafol
0
236

The End.