Reply
upload and display on the same admin page
Old 06-04-2008, 02:45 AM upload and display on the same admin page
abhi's Avatar
Skilled Talker

Posts: 80
Name: abhishek
Location: mauritius
Hi, I know the basic stuff of php. I already know how to upload picture and text in the database. But, as you know, the upload page and display page is different. What I want is to upload the picture and the text and display what I upload on the same page.
Any suggestions will be welcome. Thanks a lot

< link drop removed >

Last edited by chrishirst : 06-06-2008 at 02:57 AM.
abhi is offline
Reply With Quote
View Public Profile Visit abhi's homepage!
 
When You Register, These Ads Go Away!
Old 06-04-2008, 04:37 AM Re: upload and display on the same admin page
Skilled Talker

Posts: 61
Just combine the two scripts, and separate them with an if/else statement checking if the $_POST variable has been set.

Code:
if (isset ($_POST)) {
// put your process script here
// after you go through the processing (validating, sending to database, etc) you can display your image/text below

echo $_POST['text'];
echo '<br />';
echo '<img src="'.$_POST['image'].'" />';
// something like that
} else {
// the form has not been sent yet, so display it now
}
CrazeDizzleD is offline
Reply With Quote
View Public Profile
 
Old 06-05-2008, 03:54 PM Re: upload and display on the same admin page
TextAdMarket's Avatar
Novice Talker

Posts: 11
Name: Ben
Location: Midwest - United States
Yup, and if it is an admin page, add something above all that to make sure the admin is logged in properly.
__________________
TextAdMarket - http://www.TextAdMarket.com
Supply & Demand Advertising
TextAdMarket is offline
Reply With Quote
View Public Profile Visit TextAdMarket's homepage!
 
Reply     « Reply to upload and display on the same admin page
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12539 seconds with 12 queries