38,019 Topics

Member Avatar for
Member Avatar for Pro2000

Hi, I tried this code: [ICODE]<?php session_start(); $id=$_GET['fileid']; if($id=="1") { $dwnld = "File1.zip"; } else if($id=="2") { $dwnld = "File2.zip"; } else if($id=="3") { $dwnld= "File3.zip"; } if($id) { header("Content-type: application/download"); header("Content-disposition: filename=$dwnld"); readfile($dwnld); } ?>[/ICODE] I want the user to download those files from a folder named Archives... Example: …

Member Avatar for nav33n
0
165
Member Avatar for lydia21

html page <form method="get" action="sort2.php"> <table> <tr> <td>id</td><td><input type="text" name="id"></td> </tr> <tr> <td>From</td><td><input type="text" name="from"></td> <td>To</td><td><input type="text" name="to"></td> <td><input type="submit" name="submit" value="submit"></td></tr> </table> </form> sort2.php <?php $id=$_REQUEST['id']; $to=$_REQUEST['to']; $from=$_REQUEST['from']; $link=mysql_connect($hostname, $username, $password); mysql_select_db($dbid) or die("unable to connect"); $query="(select name,id from member where id=(select day,time from attend where day between '$from' …

Member Avatar for nav33n
0
149
Member Avatar for webguru07

I have a 2D array like this: [code]$cart = array(array("Item", 6.99), (array("Item 2", 13.99)); [/code] i am using this for a shopping cart i am making. I can add to it fine. What i need to be able to do is remove items from the array. I have been racking …

Member Avatar for nav33n
0
107
Member Avatar for eXceed69

I've Install this script to my site but It won't function that well Here's the code, which logs client side IP in a flat file or *.txt [code] <?php $filename = "uniqueLogs.txt"; $file = file($filename); $file = array_unique($file); $hits = count($file); echo $hits; $fd = fopen ($filename , "r"); $fstring …

Member Avatar for nav33n
0
83
Member Avatar for natep

I have a checkbox form where different check boxes need to send the form to different email addresses. Right now, no matter the check box, it goes to the same emails. <span class="clients"> <input type="checkbox" name="blah" value="checkbox" /> Blah</span></p> <p> <span class="clients"> going here: <SCRIPT LANGUAGE="php"> $email = $HTTP_POST_VARS[email]; $mailto …

Member Avatar for nav33n
0
103
Member Avatar for ericjw316

I am new to this PHP thing. I have programmed in VS 2003 and VB and C# for web site. I am working for this new company and all their forms are sent via send mail. My problem is that i am trying to send multiple variables to send mail …

Member Avatar for buddylee17
0
88
Member Avatar for jay64

I don't really know how to explain this easily. I guess I will layout the project I am trying to do, and the problem I am having with it, and maybe someone could explain it better to me. I am trying to build an online food journal for a fitness/nutrition …

Member Avatar for jay64
0
135
Member Avatar for ruman_eee

hi everyone, I have some problem about simplifying my php code. At first I want to load my form and then load my information from database if their are any data exists according to the user name. Actually the problem is,I want to load the js while the information is …

Member Avatar for scru
0
119
Member Avatar for Venom Rush

Hi everyone I'm looking for a script that uploads and resizes images onto a server. I've been tormenting myself with the one from [url]http://blazonry.com/scripting/upload-size.php[/url] The reason I think that it's not working is because the server I'm working on doesn't have the libjpeg and libgr-progs library packages. And I'm not …

Member Avatar for Venom Rush
0
91
Member Avatar for drsmith

I want to create a dynamic link to a file...basically the info is displayed in a .php template read in from MySQL db. I want to also have a link to the saved text file. Here is some of what I have: [code] $date=$_POST[Date_Entered]; $shift=$_POST[shift]; $shift_table=$shift."_shift_duties"; $fileDir="TOP".$shift."Shiftlog" $fileID=.$date."_".$shift."shift.rtf"; [/code] and …

Member Avatar for drsmith
0
91
Member Avatar for paranjyoti

Dear All, I have two files, usr_profile.php and edit_profile.php. The former is for displaying the user's info viz 'Name', 'Email' etc while the latter is for editing the info available in the former. After editing the info in the edit_profile.php and submitting it, it gets redirected to the usr_profile.php. The …

Member Avatar for nav33n
0
93
Member Avatar for DaitoTsu

Hi there guys & gals, this is my first post here will try to be as accurate as possible. The problem i have seems to me to be quite basic but i cannot for the life of me work out how i can do it, am hoping you good folks …

Member Avatar for DaitoTsu
0
186
Member Avatar for lydia21

hi i have two different table,i want to select the name and id(primary key) from the first table..based on the id..i want to select the rest of the data in the second table... the below query is showing error,plz do tell me the bug. $query="select id,name from table1 where id='$id' …

Member Avatar for nav33n
0
88
Member Avatar for dreamerdevos

I have tried a lot of things. The lines of code; $file_name1=$_FILES["image"]["name"]; $ext = strtolower(end(explode('.', $file_name1))); if($ext!="jpg"&&$ext!="jpeg"&&$ext!="png"&&$ext!="tif"&&$ext!="gif") The middle line being the line that is in "error" gets this error when trying to upload a picture, Fatal error: Only variables can be passed by reference $ext = strtolower(end(explode('.', $file_name1))); My …

Member Avatar for nav33n
0
108
Member Avatar for jfhow

I developed an online store catalog using PHP & MYSQL on Windows. It imports tab delimited data for new products from text files in a folder. While it worked fine on Wndows, when I run it in the MAMP installation on my iMac with Mac OSX it is not working. …

0
41
Member Avatar for moyles
Member Avatar for jencinas69

Hello I need to do a form that writes to a database I know how to do that What I dont now how to do is how I dump my data from the db as XML I want the data to come out like this on the xml <jobs> <job …

Member Avatar for martin5211
0
84
Member Avatar for gotmick

I have a form page on a public webserver that needs to send queries to a different internal server on our network, and have the results sent back to our public server. The internal server is an AS400 i5 running Zend Core php and querying a DB2 database. Making this …

Member Avatar for martin5211
0
137
Member Avatar for moyles

[B]hello i would like to add a training function to my online texted based game could someone help me ??? is there any websites or scrips whihc help u ?? thanks moyles[/B]

Member Avatar for moyles
0
78
Member Avatar for billah_norm

[FONT=Comic Sans MS]WEB ADDRESS FOR FREE DOWNLOADING OF PDF COPY OF A PHP BOOK[/FONT] Hello? I am a new learner of PHP. I have interested about it. I want to know any web address for downloading a free pdf copy of a good well known introductory book.

Member Avatar for avmaza
0
215
Member Avatar for kings

hi i have a table where dates and other info are getting inserted... i have a form where the user can select a start date end date.. based on the start date and end date ..i want to retrieve all the content stored between these dates.....

Member Avatar for nav33n
0
83
Member Avatar for SamWinters

I'm trying to learn php/mysql Read "php and mysql for dummies" and keep getting stuck. Can you get me through this? Regards, Kris [email]m31342@hotmail.com[/email]

Member Avatar for ithelp
0
172
Member Avatar for kusal

Hi, hope this is the right place, Here is my problem <h4 Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla </h4> I want the content between <h4> tags in a variable, using only one expressions thnx Kusal

Member Avatar for nav33n
0
124
Member Avatar for kings

hi i want to insert the textbox content to database....wen i give disabled="true" data is not getting inserted in database....when there is no disabled attribute it is getting inserted..... <form name="fm3"> <table> <tr> <td>splendor Id</td><td><input type="text" name="id3" size="20" disabled="true" value=<?php print "$_SESSION[uname]";?>></td> </tr> <tr> </table> </form>

Member Avatar for kings
0
130
Member Avatar for rtx

Hi, I am trying to code to put a PayPal logo in a page. Here is the code: [ICODE]<?php // ----------------------------------- // PAYPAL ACCEPTED ITEM // ----------------------------------- // test if box should be displayed $show_MYK_PAYPAL = true; if ($show_MYK_PAYPAL == true) { ?> <div align="center" style="padding:5px;"> [COLOR="Red"]<!-- PayPal Logo --><table …

Member Avatar for nav33n
0
95
Member Avatar for gym_shorts

Hello all, I have a problem and after searching for hours was hoping someone would have some information that would greatly help me out. I am developing a website locally on my development machine, (Mac OS X Tiger 10.4.11, Apache 1.3.33, and PHP 5.2.2). The site is based on a …

Member Avatar for gym_shorts
0
105
Member Avatar for ybn1197

Hi all - I'm hoping someone here can help me with this as I have been trying to figure it out for the past 48 hours and have made little progress. I have two table in my database. The Primary Key (Serial) in tblTitles is the Foreign Key(Serial) in tblQuotes. …

Member Avatar for ybn1197
0
101
Member Avatar for nathanpacker

Quick question here. I wanted a way to quickly change the URL of an image that is place on my page, so I came up with the following little script: [code=php] <?php echo "Status: $status"; if ($status == 'Online'){ rename('status.bmp', 'offline.bmp'); rename('online.bmp', 'status.bmp'); } elseif ($status == 'Offline'){ rename('status.bmp', 'online.bmp'); …

Member Avatar for nav33n
0
337
Member Avatar for drsmith

I posted this in the html section but I am not sure if it will be that simple. I have a .php form that populates from info in a MySQL DB. Anyway, I want to have the ability to email the form(whatever happens to be displayed at the moment) to …

Member Avatar for drsmith
0
109
Member Avatar for rime

I am trying to write a code to get IP of a computer. I have written the following code : <?php $ip=@$REMOTE_ADDR; echo "<font face='Verdana' size='3'><b>IP Address= $ip</b>"; ?> But the output I am getting is : IP Address= 127.0.0.1 i.e the common IP for all machines, what is the …

Member Avatar for nav33n
0
117

The End.