Jump to content

picture/news upload/dispaly


monika

Recommended Posts

i'm trying to built simillar like this page. can anyone help me..

untitled1py5.gif

 

Below code is able to dispaly the announcement but i'm not able make rest

1) announce edit/delete/add

2) photo upload/delete [admin section]

3) photo dispaly in view page..

4) add/remove additional announcement.. [admin section]

 

 

------add.php---------

<?php

if((isset($act)) && ($act=="action")){

$dates=date("Y-m-d");

echo "<div class=text>Data successfully updated on ". $dates. "<br> please wait while your browser redirects you to the main admin page.....</div>";

 

$sql=mysql_query

("update announcement set date='$dates',

title3='" . mysql_real_escape_string($announce1) . "',

text3='" . mysql_real_escape_string($detail1) . "'");

?>

 

------------------view.php--------------

<div style="padding: 15px 30px 15px 55px">

<b><?php echo $data->title; ?></b>

<br>

<?php echo $data->text;?>

</div>

Link to comment
Share on other sites

I guess the above code is my atempt...you dont have to be that harsh. I was just asking help...

 

well I made that graphic-pic just to explain in wide way.......

 

the above code [add.php] can submit announcemet

and [view.php] is able to display..

now i'm wodering how to add image through browse button and

how to add/delete additional announcement according to requirement from browser..

 

 

is my way of asking help wrong.. i appologies..

I"m totally new to php.. else i would not have come here.. for help...

 

 

i'm very sad bye by your harsh dialogue..... thanx for hurting me..

 

Link to comment
Share on other sites

There was nothing harsh about anything I said above, I simply gave you advice on what to do...sorry you took it the wrong way.

 

Lets help you one question at a time:

now i'm wodering how to add image through browse button

 

There are tons of tutorials on this, you just have to google it:

http://www.phpfreaks.com/tutorials/36/0.php

http://www.fornewbie.com/article/php/upload_image_file_to_mysql_database_php_tutorial..html

http://www.plus2net.com/php_tutorial/php_file_upload.php

http://www.visualdesigncore.com/tutorials/PHP-MySQL/PHP-Image-Upload/

http://www.spoono.com/php/tutorials/tutorial.php?id=42

 

Those should give you everything you are needing for uploading an image. So you should give those tutorials a try, and if you have any problems, just post your code and problem and we will help you =]

 

Link to comment
Share on other sites

how to add/delete additional announcement_including pic according to requirement from browser..

 

I'm not entirely clear on what you mean...but if you are just talking about deleting something from the database, you would just use a delete query.

 

<?php
   $query = "DELETE FROM table WHERE condition";
   $result = mysql_query($query)or die(mysql_error());
?>

Link to comment
Share on other sites

no no i'm not only talking about deleting...

 

i want to add additional entry too for that do i've to write each time code manually?

 

if yes then that doesnot seems that i'm using php :P

 

thus is there a way, in which administration can add additional announcement as per the requirement.

 

p.s : each announce has their own picture.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.