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
https://forums.phpfreaks.com/topic/61061-picturenews-uploaddispaly/
Share on other sites

This forum is made to help people, not do the coding for them. If you want that, you need to post this in the freelancing section.

 

If you give an attempt at the code, and run into a problem...I am sure someone would be happy to help you.

 

 

 

 

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..

 

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 =]

 

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());
?>

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.