39,316 Topics

Member Avatar for
Member Avatar for sammry

Hi, I am trying to give an avatar to my visitors based on their sex and their profile pic.i have written a code and am getting the desired result, but not happy with the coding part, hence seeking help on this. My member database contains, profilepicture field where member can …

0
70
Member Avatar for rickarro

Good Day, I'm trying to changed the background color of a field based on the results of the field. My script runs fine and provides the data correctly. I query my database and it gives me a result of $priority. $priority can be High, Medium, or Low. What I want …

Member Avatar for trentbam
0
4K
Member Avatar for petrakid

Normally when I do file uploads I save the files into the website's file system. However in this particular situation I am required to save the PDF files as a longblob into a table in our mysql database. The data field is set as a longblob, and the table is …

0
124
Member Avatar for simplypixie

Can anyone see why my variable $unit_price isn't updating (in fact it isn't even being applied to the session variable) in this code (it must be something simple but I can't see it and is driving me mad). I have tested the posted data and it is being sent through …

Member Avatar for simplypixie
0
146
Member Avatar for rambo12

Hi I would like to know if I can use freeswitch with PHP for voice chat. I have downloaded the freeswitch software But I am not getting how to configure php with freeswitch where to use this in freeswitch can voice chat application be created using php. how freeswitch is …

Member Avatar for Ezzaral
0
480
Member Avatar for lastgame2007

i have this recommendation that, the teacher can add continuously how can i do this? in which the teacher can add grade and on single button it can be all saved in one database [url]http://www.4shared.com/photo/TjiwnmxX/aaa.html?refurl=d1forum[/url] [CODE] <?php if(isset($_POST['save'])) { $g_year['acad_id']; $fg=$_POST['fg']; $sg=$_POST['sg']; $tg=$_POST['tg']; $forg=$_POST['forg']; for($i=0;$i<count($fg) && $i<count($sg) && $i<count($tg) && …

Member Avatar for diafol
0
98
Member Avatar for Ctechnology24

Guys I need to print tne content of my div named "content" my code will only work if their is only one div named "content" but in my case I have a lot of div with same ID because I iterated it along with the codes from mysql, can anybody …

Member Avatar for Biiim
0
2K
Member Avatar for breakforce

Hello :) I have a system to add friends, i would like to make it as i want, but something does not deal... This is a SQL now: [code]CREATE TABLE `friends` ( `id` int(11) NOT NULL AUTO_INCREMENT, `f_id` int(11) NOT NULL, `us_id` int(11) NOT NULL, `active` enum('0','1') NOT NULL DEFAULT …

Member Avatar for diafol
0
115
Member Avatar for Stretty

Hi I have a form page (form.php) which calls a seperate PHP page to insert a new record (insert.php). Insert.php then redirects to a listing page (list.php) using [CODE]header('Location: list.php?z='.$access);[/CODE] ($access is the user id and priveledge level and is passed through all pages as our company does not allow …

Member Avatar for Stretty
0
257
Member Avatar for arunpawar

I am trying to create a url bookmark script for my own use. Here's the code. [CODE]<?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("delicious") or die(mysql_error()); $data = mysql_query("SELECT * FROM stacks") or die(mysql_error()); if(mysql_num_rows($data)) { echo '<table cellpadding="0" cellspacing="0" class="db-table">'; echo '<tr><th>No</th><th>Name</th><th>URL</th></tr>'; while($row2 = mysql_fetch_row($data)) { echo '<tr>'; foreach($row2 as …

Member Avatar for broj1
0
107
Member Avatar for tahirkhanafridi

Hi friends! i have a drop down combo box which holds names of persons with php mysql order by asc query like a's name put in 1st and after b's and c's and in last it shows z's name now i want that if it will show tahir name in …

Member Avatar for pritaeas
0
167
Member Avatar for Ctechnology24

Guys I am having a problem on how can I display array of records using mysql_num_rows, I cant use mysql_fetch_array because the format like this [CODE]$row['MR_no'];[/CODE] that encloses the name of the field inside brackets in my SQL codes this is my codes: [CODE]<?php $username = $_SESSION['username']; $query = "select …

Member Avatar for Biiim
0
217
Member Avatar for ghostonline2020

i tried refreshing the page using header but it didnt work.. header .. my "the 9th line from the bottom... thanks in anticipation of your replies <form name="page" method="POST" action="page.php"> <fieldset> <label for="name" id="name_label">Name</label> <br /> <input type="text" name="name" id="name" size="30" value="" class="text-input" /> <label class="error" for="name" id="name_error">This field is …

Member Avatar for pritaeas
0
180
Member Avatar for dioz20

Hello. I'm currently coding a customer/product/etc registration site and there's this problem I just kinda can't figure out even after searching around on the web. The DB consists of 8 tables User (for login handling) Customer (for customer registration) Product (for product registration) ProductCategory (for product category registration) Cleaning (for …

0
73
Member Avatar for baig772

Hi all I am trying to show a comment box under each post, i have tried [code]<?php get_template_part( 'content', 'single' ); ?> <?php comments_template( '', true ); ?> [/code] but the comment box is still invisible

Member Avatar for simplypixie
0
200
Member Avatar for priyadharsinism

I have a login form in my project and i want to know the code how to show the other forms only when the login is successful. The code below is the login code. [CODE] <?php extract($_POST); $uname=$_POST['user']; $pwd=$_POST['password']; $con=mysql_connect('localhost','root','') or die('could not connect:'.mysql_error()); mysql_select_db("priya",$con); $result=mysql_query("select * from user where …

Member Avatar for simplypixie
0
79
Member Avatar for dgordon1966

I am having trouble getting this to work. I am getting "Parse error: syntax error, unexpected T_STRING in public_html/send.php on line 22. Line 22 is the mail statement I highlighted red. If anyone can help me out I would be very grateful. <?php $to='dgordon1966@gmail.com'; $subject='Registration Confirmation'; $number=$_POST['text1']; $name=$_POST['text2']; $body= .$name. …

Member Avatar for simplypixie
0
83
Member Avatar for momonq1990

please help me to this issue. its driving me nuts for an hour :( Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hermes/bosweb/web033/b336/ipg.asiahomecom/tile/tilesCollection.php on line 16 my line 16 code: while($row=mysql_fetch_array($a)){ my code.. --------------------tileVerification.php---------------------- <?php session_start(); if (!$_SESSION['user']){ header('location: tiles.php'); exit(); } ?> ---------------------connectionIn.php------------------------- $con = …

Member Avatar for momonq1990
0
96
Member Avatar for sikarenpo

good day! i'm an old member of this forum but unfortunately i forgot both my email and pw. >< so i created another account. :) with all due respect is there somebody who can help me with this code. i've created a menu link from the database [CODE] <?php $con …

Member Avatar for simplypixie
0
165
Member Avatar for SQLpower

Basically I need some serious help on this one, last one. I am really confused. How can I get my yearofbirth, month of birth and day of birth from my login page, with only having Username/Password as login?? Just basically, creating a [CODE] $_SESSION = ['age'] = The age of …

Member Avatar for simplypixie
0
309
Member Avatar for Motifaithed

Hi Guys, I'm comparing to tables, one profiletable and one presenttable, I want to compare two dates upon entering, the date from a textbox, I want to validate all data from profiletable and on the presenttable, if left on the profiletable without the tag of the date that I input, …

0
50
Member Avatar for bavenbabu

I am not redirecting to the respective page.What might be the reason?????Can i get my code correctly.Any help would be appreciated <form action="rollno.php" method="GET"> <table> <tr> <td>username</td> <td><input type="text" id="username" name="username" value="<?php if (isset($_GET['username'])) { echo $_GET['username']; } ?>"><span style="color:red"> <?php if(isset($_GET['username'])&&($_GET['username']=="") ) echo "please enter username" ;?></span></td> </tr> <tr> …

Member Avatar for simplypixie
0
91
Member Avatar for Ctechnology24

guys please help, why I get this error from my codes: Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\bernardino_ed\Bloodchem.php on line 125 [ICODE] $username = $_SESSION['username']; // this is for the paganation of records $per_page = 2; $pages_query = mysql_query("select * from tblpatient_info i, tbllab_bloodchem b, tbldoctor_info d, tblpatient_pass p …

Member Avatar for Ctechnology24
0
104
Member Avatar for joeywheels

I think my site has been hacked! I found these lines of code on all my php files and I didn't put them there. Problem is I don't know enough php to understand what this batch of code does. Could anyone please help? How bad is it? Here's the code: …

Member Avatar for weekendrockstar
0
179
Member Avatar for abhishek2301

Hello, I am trying to understand the exact procedure of the IMG_FILTER_CONTRAST function available in the GD library. After delving through the source code, I found the following function which performs the computation: [code=c] int gdImageContrast(gdImagePtr src, double contrast) { int x, y; int r,g,b,a; double rf,gf,bf; int new_pxl, pxl; …

0
76
Member Avatar for spowel4

I'm posting 20 usernames and 20 passwords, they're named username1 ... username20 and then password1 ... password20. In the page that processes the posted values I have an array like this: [CODE] $postArray = array( *** * other values in array *** $userName1 = $_POST['userName1']; $password1 = $_POST['password1']; * * …

Member Avatar for shovels
0
209
Member Avatar for himanshu.1691

I have a project in which i have two roles : Student Teacher I have already created a login page but i cant figure out how to redirect them to different pages according to their Roles...

Member Avatar for broj1
0
132
Member Avatar for seemeamal

[CODE]<?php //update has an error! ?> <?php include("lock.php");// contains session details $connect=mysql_connect("localhost","root",""); mysql_select_db("login",$connect); if(isset($_POST[""])){ $dept_name=$_POST["dept_name"]; $year=$_POST["year"]; $current_sem=$_POST["current_sem"]; $total_students=$_POST["total_students"]; $regulation=$_POST["regulation"]; } //------------------------------------------------------------------------------------------------------------------ if(isset($_POST["insert"])){ if($_POST["insert"]=="yes"){ $dept_name=$_POST["dept_name"]; $year=$_POST["year"]; $current_sem=$_POST["current_sem"]; $total_students=$_POST["total_students"]; $regulation=$_POST["regulation"]; $query="insert into classprofile(dept_name,year,current_sem,total_students,regulation) values('$dept_name','$year','$current_sem','$total_students','$regulation')"; if(mysql_query($query)) echo "<center>Record Inserted!</center><br>"; } else{ echo"not inserted, try again"; } } //------------------------------------------------------------------------------------------------------------------- if(isset($_POST["update"])){ if($_POST["update"]=="yes"){ $dept_name=$_POST["dept_name"]; $year=$_POST["year"]; $current_sem=$_POST["current_sem"]; …

Member Avatar for GliderPilot
0
121
Member Avatar for saadi06

Hi, I am stuck with a problem.I have an array that contains dates and I want to get the date ranges from this array. For example array('01/01/2012','01/02/2012','01/03/2012','01/05/2012','01/10/2012') Now I want the date range from this array And the dates are not sorted in array. Can anyone help me its quiet …

Member Avatar for veedeoo
0
165
Member Avatar for dushtu.bor

Please tell me why it gives me always zero value? [CODE]<?php $total =0; $memid = $_POST['username']; $leg = $_POST['leg']; mysql_connect ("host", "usr", "paswd") or die ('Error: ' .mysql_error()); mysql_select_db ("dbname"); function getTotalLeg($memid,$leg){ $sql="select $leg from `users` where `username`='$memid' "; $res=mysql_query($sql); $row=mysql_fetch_array($res); global $total; $total = $total+mysql_num_rows($res); if($row['$leg']!=''){ getTotalLeg ($row['$leg'],'lname'); getTotalLeg …

Member Avatar for dushtu.bor
0
179

The End.