I install php script.Everything is fine.But when i go to the page (Code Below ) Update button is not showing on internet.While when i open the file with Dreamweaver i can see the Update button.Please be advice.
I am not php coder.Dont know that much about programming.
Thank you in advance

<?

include "logincheck.php";
include_once "myconnect.php";
function main()
{
$rs0=mysql_fetch_array(mysql_query("select * from sbprj_config where sb_id=1"));
?>
<script language="JavaScript">

function Validator(form)
{
	if( isNaN(form.sb_max_duration.value) || form.sb_max_duration.value<1 || form.sb_max_duration.value=="")
	{
		alert("Please specify non-zero positive value for Bid Duration");
		form.sb_max_duration.focus();
		form.sb_max_duration.select();
		return false;
	}
	if( isNaN(form.sb_max_extend_duration.value) || form.sb_max_extend_duration.value<1 || form.sb_max_extend_duration.value=="")
	{
		alert("Please specify non-zero positive value for Extension Period");
		form.sb_max_extend_duration.focus();
		form.sb_max_extend_duration.select();
		return false;
	}
	if( isNaN(form.sb_title_len.value) || form.sb_title_len.value<0 || form.sb_title_len.value=="")
	{
		alert("Please specify positive value for Title Length");
		form.sb_title_len.focus();
		form.sb_title_len.select();
		return false;
	}
	if( isNaN(form.sb_desc_len.value) || form.sb_desc_len.value<0 || form.sb_desc_len.value=="")
	{
		alert("Please specify positive value for Description Length");
		form.sb_desc_len.focus();
		form.sb_desc_len.select();
		return false;
	}
	if( isNaN(form.sb_comment_len.value) || form.sb_comment_len.value<0 || form.sb_comment_len.value=="")
	{
		alert("Please specify positive value for Comments Length");
		form.sb_comment_len.focus();
		form.sb_comment_len.select();
		return false;
	}
	<?php 
   	  
?>
	if( isNaN(form.sb_msg_len.value) || form.sb_msg_len.value<0 || form.sb_msg_len.value=="")
	{
		alert("Please specify positive value for Message Length");
		form.sb_msg_len.focus();
		form.sb_msg_len.select();
		return false;
	}
	if( isNaN(form.sb_image_size.value) || form.sb_image_size.value<1 || form.sb_image_size.value=="")
	{
		alert("Please specify non-zero positive value for Image Size");
		form.sb_image_size.focus();
		form.sb_image_size.select();
		return false;
	}
	return true;
}
</script>

<form action="update_config_project.php" method="post" name="form123" id="frm1"  onSubmit="return Validator(this);" >
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td><table width="100%" border="0" cellspacing="2" cellpadding="2" class="onepxtable">
          <tr valign="top" class="titlestyle"> 
            <td colspan="3">&nbsp;Project Parameters </td>
          </tr>
          <tr valign="top"> 
            <td width="48%" align="right" class="innertablestyle"><strong><font class="normal">Bid 
              Duration:</font></strong></font></td>
            <td width="6"><font class="red">*</font></td>
            <td width="52%"> <input name="sb_max_duration" type="text" class="box1" id="sb_max_duration" value="<? echo $rs0["sb_max_duration"];?>" size="15" > 
              <font class="normal">Days</font><br> <font class="smalltext">Sets 
              the maximum bid duration allowed for a new project posting.</font></td>
          </tr>
          <tr valign="top"> 
            <td align="right" class="innertablestyle"><strong><font class="normal">Extension 
              Period :</font></strong></td>
            <td><font class="red">*</font></td>
            <td> <input name="sb_max_extend_duration" type="text" class="box1" id="sb_max_extend_duration" value="<? echo $rs0["sb_max_extend_duration"];?>" size="15" > 
              <font class="normal">Days</font><br> <font class="smalltext">Sets 
              the maximum extension duration allowed for an expired project.</font></td>
          </tr>
          <tr valign="top"> 
            <td align="right" class="innertablestyle"><strong><font class="normal">Title 
              Length :</font></strong></td>
            <td><font class="red">*</font></td>
            <td> <input name="sb_title_len" type="text" class="box1" id="sb_title_len" value="<? echo $rs0["sb_title_len"];?>" size="15" > 
              <font class="normal">Characters</font><br> <font class="smalltext">Sets 
              the maximum characters allowed for project title, 0 here will disable 
              this restriction.</font></td>
          </tr>
          <tr valign="top"> 
            <td class="innertablestyle" > <div align="right"><font class="normal"><strong>Description 
                Length :</strong></font></div></td>
            <td><font class="red">*</font></td>
            <td> <input name="sb_desc_len" type="text" class="box1" id="sb_desc_len" value="<? echo $rs0["sb_desc_len"];?>" size="15" > 
              <font class="normal">Characters</font><br> <font class="smalltext">Sets 
              the maximum characters allowed for project description, 0 here will 
              disable this restriction.</font></td>
          </tr>
          <tr valign="top"> 
            <td class="innertablestyle" > <div align="right"><font class="normal"><strong>Comments 
                Length :</strong></font></div></td>
            <td><font class="red">*</font></td>
            <td> <input name="sb_comment_len" type="text" class="box1" id="sb_comment_len" value="<? echo $rs0["sb_comment_len"];?>" size="15" > 
              <font class="normal">Characters</font><br> <font class="smalltext">Sets 
              the maximum characters allowed for comments given while bidding 
              for a project, 0 here will disable this restriction.</font></td>
          </tr><?php 
		      	 if(!isset($wnauc))
{ die();}   	  
?>
          <tr valign="top"> 
            <td class="innertablestyle" > <div align="right"><font class="normal"><strong>Message 
                Length :</strong></font></div></td>
            <td><font class="red">*</font></td>
            <td> <input name="sb_msg_len" type="text" class="box1" id="sb_msg_len" value="<? echo $rs0["sb_msg_len"];?>" size="15" > 
              <font class="normal">Characters</font><br> <font class="smalltext">Sets 
              the maximum characters allowed for message text for internal messaging, 
              0 here will disable this restriction.</font></td>
          </tr>
          <tr valign="top"> 
            <td class="innertablestyle" > <div align="right"><font class="normal"><strong>Image 
                Size :</strong></font></div></td>
            <td><font class="red">*</font></td>
            <td> <input name="sb_image_size" type="text" class="box1" id="sb_image_size" value="<? echo $rs0["sb_image_size"];?>" size="15" > 
              <font class="normal">Bytes</font><br>
              <font class="smalltext">Sets the maximum size allowed for image 
              files to be uploaded for logo by members.</font></td>
           </tr>
          <tr valign="top"> 
            <td align="right" class="innertablestyle">&nbsp;</td>
            <td>&nbsp;</td>
            <td> <font class="normal"> 
              <input name="Submit" type="submit" class="submit" value="Update">
            </font></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
<?
}// end main
include "template.php";?>

Recommended Answers

All 7 Replies

Are you sure, there is no update button on the browser?
Check in case if its somewhere else, like too down the browser to take a note of it, maybe due to some design issue.
Can you attache the snapshot of what you can see.

The only reason I can think of is that the button's css class 'submit' has display: none or visibility: hidden

Agree to pritaeas.
One more strange thing i observed, whats the need to put the javascript functions inside the php main function?

Agree to pritaeas.
One more strange thing i observed, whats the need to put the javascript functions inside the php main function?

So he can call main() from his template to insert the code at the position he wants it.

But this anyways he could include as external js script whereever he wants, by putting the js code in some other js file

But this anyways he could include as external js script whereever he wants, by putting the js code in some other js file

Yes, that's what I would do too ;)

;)

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.