39,316 Topics

Member Avatar for
Member Avatar for johnfrey

Uploading a file is a basic requirement of most of the websites. In this post, I will explain in detail about how to upload an image using PHP. First of all, we will add HTML code to display the browse button to upload an image: [CODE]<FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD=POST> Upload …

0
57
Member Avatar for BigDan531

okay heres my code below: [code] $keys = rand(10000,99999); $fkeys = rand(100,999); $bkeys = rand(100,999); $key = $fkeys,$keys,$bkeys; echo $key [/code] this line "$key = $fkeys,$keys,$bkeys;" is giving me errors. i would like the result to be something like $fkeys$keys$bkeys. Any idea how i would be able to do that?. …

Member Avatar for innocent.boys
0
95
Member Avatar for daved83

Hi, I'm a Php novice. I need to perform a function based on whether a sqlquery result is a float value or not. I can do it with any variable but query results. I don't know what the reason is for this and have wasted all day on it! Any …

Member Avatar for daved83
0
66
Member Avatar for BigDan531

okay guys heres the problem. i have installed iis, and i am trying to send emails through a php script. i have followed all steps listed in [url]http://www.ruhanirabin.com/php-sendmail-setup-with-smtp-iis-and-windows-servers/[/url] . the page lists a php script [code] <?php if(mail('user@mydomain.com','test subject','test message')){ echo('ok'); } else{ echo('not ok'); } ?> [/code] When i …

0
58
Member Avatar for Amaina

Dear friends I am creating a php login/register form to register and authenticate users.My problem is that the form does not submit the data in the form to the database.Please see the code below: [code=php]<?Php session_start(); /****************/ //original Amaina......slowly coming of age// include 'dayta.php'; //connect $link = mysql_connect($database_host, $database_user, $database_password); …

Member Avatar for Amaina
0
178
Member Avatar for lan89

Hello I want to show my statistics data, now the system only show the data which is recorded only. For example, if 07-08-09 ( visitor 10 person ). Then for 06,08,09 (visitor 0 person) Now the system only show date which have visitor only. The date which have no visitor …

Member Avatar for sam023
0
55
Member Avatar for ayuscomeyh

how to pass the value 'id_category' from this page list.php [code] <title>home</title> <!--for auto refresh--> <META HTTP-EQUIV=Refresh CONTENT="300; URL=http://localhost/recipe2/home.php"> <body> <div align="left"><img src="Cookie Banner edited.jpg" width="1100" height="200" /></div> <h2>My Account </h2> <p>chef today : <?php echo $_SESSION['myusername']; ?> | <a href="logout.php">Logout</a> </p> <p>&nbsp;</p> <p>&nbsp;</p> <?php include 'recipe2db.php'; $sql="SELECT id_category FROM …

0
59
Member Avatar for xuexue

guys i need help, how could i get the id of a button? i have this code [code] echo "form action = 'sec_ph_fileMain.php' method = 'post'>"; echo "<input type = 'submit' name = 'upload' value = 'Upload' id = 'hi'>"; //variable declaration $upload = $_POST['upload']; [/code] what i want is …

Member Avatar for xuexue
0
116
Member Avatar for 68thorby68

It's day 5 of reading expert analysis, white papers and a myriad of posted mailer classes, but I seem to be so far away of constructing my PHP script to prepare and send a text and attachment email. Below is the "hash" of different codes I have been able to …

Member Avatar for noelthefish
0
253
Member Avatar for EvilOrange

hi was just wondering what the difference is between the echo and print_r commands bacause when i run this code: [INDENT][CODE]<?php $output = "this sentence"; $face = explode(" ", $output); print_r($face); echo $face; ?>[/CODE][/INDENT] it outputs Array ( [0] => this [1] => sentence ) Array so the echo isn't …

Member Avatar for EvilOrange
0
126
Member Avatar for danimal132

this is a complete NOOB question but i need help. I have WAMP installed and was given a IP address, the user name and password to the site so i could edit the html. But i need to edit the PHP. I need to add a few more fields to …

Member Avatar for rahul8590
0
75
Member Avatar for Tkirbs

I am working on a website with a custom CMS built into it and on the index page of the site I am pulling two different sets of information from the database and there are read more links that I would like to have link up to two different pages. …

0
48
Member Avatar for rahul8590

i have created a database initially and had framed only one table. The php script was working fine , i could store values and reterive from them. I again created one more table in the same database , inorder to store data in it. but the PhP script is by …

Member Avatar for rahul8590
0
135
Member Avatar for decay

Hi I am running on hosts shared server - windows 2003 with IIS 6 and apache but they can't redirect in IIS as its shared and I have no .htaccess rights even if I did my hosts say it is very limited. I also have front page server extensions installed. …

Member Avatar for decay
0
248
Member Avatar for satheeshn

Hi friends, I have use relative div positions with in 5 div absolute div position elements. How write in pdf using php. Regards, Satheeshkumar sample code. [code=php]<?php for($i=0;$i<$count;$i++) { ?> <div style="position:relative;border:solid 0px black;width:600px;height:230px;top:5px;"> <div id='dt' style="position:relative; top:<? echo $dty]-400; ?>px; left:<? echo $dtx]; ?>px; text-align:left;" name=dt><?php echo $dat[$i]; ?></div> …

0
45
Member Avatar for silntj101

Hi all, I'm currently developing a search engine that allows users to upload urls of educational programmes to a database as well as add their own keywords for later searching. This all works fine, i want to know if it is possible to update a single field in a table …

Member Avatar for silntj101
0
96
Member Avatar for ayuscomeyh

after login, go to this page. client will click those button then view each recipe they click. list.php [code] <?php session_start(); if(!isset($_SESSION['myusername'])&&!isset($_SESSION['mypassword'])) { header('Location:401.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> <!--for auto refresh--> <META HTTP-EQUIV=Refresh CONTENT="300; URL=http://localhost/recipe2/home.php"> <title>home</title> </head> <body> <div align="left"><img src="Cookie …

Member Avatar for CFROG
0
11K
Member Avatar for innocent.boys

Hello Friends.. there is a time Duration field in my page..!! in format mins:sec 03:45 05:11 . . i want o show total of all time duration in last...!! . . is there any predefined function to do this..!! . . thanks..!! :)

Member Avatar for innocent.boys
0
85
Member Avatar for CFROG

I'm working a very simple script for an email (messaging) between users. I have a form with two buttons that gives you the option to save message as a draft or just send it to the user. Here are the two buttons on form: [code=html] <input type="submit" name="save" id="save" value="Save …

Member Avatar for CFROG
0
155
Member Avatar for ivanichi

Hi..friend.. anybody help me, how to display motherboard serial with php script ? thanks... :)

Member Avatar for ivanichi
0
105
Member Avatar for peck3277

Hi everyone, I have a slight problem that I hope you can help me with. I am trying to write a website to display the poems and songs my grandfather wrote beore passing away. Seeing as most of his work was poems the formatting is important! Ideally what I would …

Member Avatar for peck3277
0
59
Member Avatar for whiteyoh

Hi all, Im busy moving a site from localhost to hosted server and im baffled as to why mysqli simply wont run. The following script iscalled after a captcha script has been satisfied, but it just doesnt seem to like the Mysqli. I have converted other simple mysqli scripts, but …

Member Avatar for whiteyoh
0
96
Member Avatar for cheazygoya

Hello Everyone, I am having difficulty looping through an array of stored procedures. The issue: Array with x number of stored procedures Column names identical in all Stored procedures (PO_Date, PO_Data, PO_Pointer) Each stored procedure has three inputs pi_pid, pi_from, pi_thru Must execute each stored procedure in the array Must …

0
46
Member Avatar for Radamanthas

Hello all. I just installed wampserver2.0 and created a test php file to test it out (test.php). The only thing in the file is this: [code=php] <?php echo "Hello World"; ?> [/code] Here's the problem...when I navigate to [url]http://localhost/test.php[/url], the page displays a short line of what appears to be …

0
37
Member Avatar for rajesh_kanna
Member Avatar for diafol
0
108
Member Avatar for EvilOrange

i'm trying to execute a program from my php. I want to execute it and pass it a variable, i've tried using exec($cmd, $op) but the array of $op doesn't have the output within it (or anything else). Should i be using a different function to get this working? any …

Member Avatar for EvilOrange
0
140
Member Avatar for talktoade

Dear all, I encountered the following error while trying to generate PDF file in my HTML code. It is same report while creating it in PHP. Warning: main(fpdf.php) [function.main]: failed to open stream: No such file or directory in c:\wamp\www\projectcode2\pdtest.php on line 3 Fatal error: main() [function.require]: Failed opening required …

0
70
Member Avatar for aditi_19

Hi, I have created logout.php page which destroys all the session variables. Basically i want the the user to get directed to the Login page after logout button is pressed. But when the BACK button of the browser is pressed(even after logout), the user is still able to see other …

Member Avatar for aditi_19
0
183
Member Avatar for Sevenupcan

I'd like to know if it is possible to save or create an image made up of other images. The easiest way I can think of would be to have all the images as transparent pngs of the same height and width and then merge them together. Is it possible …

Member Avatar for samarudge
0
114
Member Avatar for Reliable

Hey everyone, Just seeking opinions as to whether or not you think it's wise to tackle learning more than one programming language simultaneously (eg..PHP and Action script 3.0). Ive noticed that languages have similarities which could lessen the learning curve for the ones you learn after the initial one. On …

Member Avatar for chrishea
0
108

The End.