<?php
require_once("start.php");
require_once("myconfig.php");
require_once("db.php");
require_once("kontrollo.php");
require_once("mylib.php");
require_once("datavalidation.php");

if (!isset($_REQUEST["id"]))
{
exit("which category??");
}
$category=$_REQUEST["id"];
?>
<html>
<head>
<title>GarantSig Artikull i ri</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../css/travel.css" rel="stylesheet" type="text/css">
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function validate()
{
    if(document.myform.title.value==""){alert('Verini nje titull');return false;}
    if(document.myform.subtitle.value==""){alert('Verini nje Nentitull');return false;}
    if(document.myform.rendi.value==""){
        alert('Verini nje rendesi');return false;}
    if(document.myform.content.value==""){alert('Verini nje pershkrim');return false;}
    //for(var i=0;i<3;i++)// ------nuk e njeh myfiles[] si array-------
    //if(document.myform.myfiles[i].value==""){alert('Verini figuren ' + i);return false;}
return true;
}
</script>
</head>

<body>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" valign="top"> 
     <?php include('koka.php');?>
    </td>
  </tr>
  <tr>
      <td width="100%">       <?php include('menu.php');?></td>
  </tr>
  <tr>
    <td height="460"  valign="top" width="20%">
    <table width="100%" border="0" cellpadding="0" cellspacing="0"  >
  <tr>
          <td width="20%" valign="top" bgcolor="#F5F5F5">      
        <div id="navigacija">
          <?php
          $cond=" active=1 ";
          $order=" order by rendi ";
          $x=DisplayAsLinkUL("categories","code","id","name","content.php",$cond,$order);

          ?>
          </div>
          </td>
    <td width="60%" valign="top">
                <table width="100%" border="0"><tr><td>
                  <form name="myform" method='post' enctype='multipart/form-data' action="newarticle1.php" onSubmit="return validate()">
                    <table width="100%"  class="rreth">
                      <tr> 
                        <td colspan="2"><strong><?php echo categoryname($category); ?></strong>
                          <input type="hidden" name="category" value="<?php echo $category; ?>">
                          Artikull i ri</td>
                      </tr>
                      <tr> 
                        <td colspan="2">Title : 
                          <input type="text" name="title" size="50">
                          Order 
                          <input type="text" name="rendi"> </td>
                      </tr>
                      <tr> 
                        <td width="43%" valign="top"><p>Subtitle:<br>
                            <textarea name="subtitle" cols="40" rows="3"></textarea>
                          </p>
                          <p>Content :<br>
                            <textarea cols="40" rows="7" name="content"></textarea>
                            <br>
                          </p></td>
                        <td width="57%" valign="top"><center>
                            <p><br><br>
                              img1 : 
                              <input type="file" name="myfiles[]" onFocus="preview1.src=this.value;" >
                            </p><br>
                            <p> img2 : 
                              <input type="file" name="myfiles[]" onFocus="preview2.src=this.value;" >
                            </p><br>
                            <p>img3 : 
                              <input type="file" name="myfiles[]" onFocus="preview3.src=this.value;" >
                            </p><br>
                          </center><br>
                          <br>
                          <br>
                          </td>
                      </tr>
                      <tr> 
                        <td colspan="2"> <p>
                          </p><br>
                           <center><img name="preview1" src="images/ins2.jpeg"  align="center" width="150" height="150"> 
                          &nbsp;&nbsp;<img name="preview2" src="images/ins2.jpeg"  align="center" width="150" height="150"> 
                          &nbsp;&nbsp;<img name="preview3" src="images/ins2.jpeg"  align="center" width="150" height="150"> 
                          </center>
                          </td>
                      </tr>
                      <tr>
                        <td><input type="submit" value="Save"></td>
                        <td> </td>
                      </tr>
                    </table>
                        </form>
                        </td>
                </tr>
                <tr>
                    <td>
                  <table  border="0" width="100%">
                    <tr> 
                      <td><hr></td>
                    </tr>
                    <tr> 
                      <td bgcolor="#F6F6F6"><!--Advertisement...--></td>
                    </tr>
                  </table>
                      </td>
                  </tr>
            </table>
        </td>
        <td width="20%" valign="top" bgcolor="#F8F8F8" ><br><br>
            <table width="100%"><tr><td>Other..</td></tr>
                    <?php
                                  $cond=" active=1 and category = '".$category."' ";
                                  $order=" order by rendi ";
                                  $x=DisplayAsLink1("articles","code","id","title","article.php",$cond,$order,"");
                    ?>
            </table>
            </td>
    </table>
    </td>
  </tr>
  <tr>
    <td valign="top" width="90%"><?php include('fundi.php');?>
    </td>
  </tr>
</table>

i wont to conect this page to another page,can somebody help me with ideas

conect this page to another page,

Can you provide more details on how you would expect this to be done?

a href, automatic redirect?

so i have another page and i wont to make this here in function of the other

the buttons like  browse and save doesnt respond to me why,
i have to change and remove some of this:



require_once("start.php");
require_once("myconfig.php");
require_once("db.php");
require_once("kontrollo.php");
require_once("mylib.php");
require_once("datavalidation.php");

what i have to do to change this

Member Avatar for Zagga

Hi andyy121,

Please be a bit more specific with your questions.
When you say the browse and save buttons don't respond, what are you expecting them to do that doesn't happen?
When you say you want to change and remove something, what is it you want to change? What do you want to change it to do?

@Zogga you have totaly right,so i wont to do this:when i click in choose file and than save button the changes must be saved in the page.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.