link php file which contains only html code to other files? here are d codes

I am trying to install an article manager and know very little of php. it looks like the login file is incomplete

how can i link the login php file which contains only html code to other files

here is the html code with the file

Username: Password:

this is the edit.php page is is to link with

<?php session_start(); //start the session include("../system.php"); //include the system if(isLogged()) { //make safe $id = makeSafe($_GET["id"]); if(!$id) echo "No id found!"; else { $query = mysql_query("SELECT * FROM news_book WHERE news_id = '$id'"); $data = getObject($query); } ?> Title:

Content:
<?php echo stripslashes($data->content);?></textare…

Category:

<?php displayCategoriesAsList(getCategory($a->… ?> <?php } else echo "You must be logged in to add news"; ?>

and this is the preceding index.php file

<?php if(session_id() == '') { session_start(); } /** * This page can be included into a page on your website, please read the readme.txt file to * find out how to get this script working. */ include("system.php"); //include the system ?> $(document).ready(function(){ $("a").jOvery({ //When popup loaded, load this function onLoad: function(){ tinyMCE.init({ // General options mode : "textareas", theme : "advanced", plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
                            // Theme options
                            theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
                            theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
                            theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
                            theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
                            theme_advanced_toolbar_location : "top",
                            theme_advanced_toolbar_align : "left",
                            theme_advanced_statusbar_location : "bottom",
                            theme_advanced_resizing : true,

                            // Skin options
                            skin : "o2k7",
                            skin_variant : "silver",

                            // Example content CSS (should be your site CSS)
                            content_css : "css/example.css",

                            // Drop lists for link/image/media/template dialogs
                            template_external_list_url : "js/template_list.js",
                            external_link_list_url : "js/link_list.js",
                            external_image_list_url : "js/image_list.js",
                            media_external_list_url : "js/media_list.js",

                            // Replace values for the template plugin
                            template_replace_values : {
                                    username : "Some User",
                                    staffid : "991234"
                            }
                    });
                  },
                  //Set trans value (90%)
                  trans: 0.9,
                  popWidth:"",
                  popHeight:"",
                  popLeft:"25%",
                  bcolour:"#222",
                  loadingText: "<center><img src='<?=INSTALL_LOCATION;?>/script/loading.gif' /><br /> Loading, please wait ...</center>"
              });
         });
         
       </script>
       <?php
       //IS USE CSS TRUE? IF SO USE THE NEWSBOOK CSS SHEET
       if(USE_CSS){
       ?>
       <style>
       @import "<?=INSTALL_LOCATION?>style.css";
       </style>
       <?php
       }
       ?>
</head>
<body>
        <div id="content">
            <?php
            //If not logged in
            echo "<span id=\"header_controls\">";
            if(!isLogged()){
               echo "<a href=\"".INSTALL_LOCATION."page/login.php\" rel=\"overlayable\"> Login </a> ";
            }else{
               echo "<a href=\"".INSTALL_LOCATION."page/addpost.php\" rel=\"overlayable\"> Add News </a> ";
               echo "<a href=\"".INSTALL_LOCATION."page/addcategory.php\" rel=\"overlayable\"> Add Category </a> ";
               echo "<a href=\"".INSTALL_LOCATION."page/settings.php\" rel=\"overlayable\"> Edit Settings </a> ";
               echo "<a href=\"?logout\"> Logout </a>";
            }
            
            echo "</span>";
            
            //DISPLAY CURRENT NEWS (WITH A LIMIT ON HOW MANY TO SHOW, THIS CAN BE CHANGED IN SYSTEM.php
            displayNews(WEBSITE_POST_LIMIT,INSTALL_LOCATION,$_GET["category"],$_GET["term"]);
            ?>
        </div>
        <div id="copyright"> &copy; Copyright <?=date("Y")?> - <b>Powered By </b> <a href="http://www.dalemooney.co.uk" target="_blank"> NewsBook </a> </div>
</body>

Is it very smartass to reply : “Ask Dale Mooney” ? ( @ www.dalemooney.co.uk ) :stuck_out_tongue:

Well, your form code goes nohwere… You need an “ACTION” argument to send it somewhere…
So, your code in the form:
Needs to be something like:

This would send your form info to the edit.php file.

And, that is the start… Let us know if you have any further questions…

To: Ojoshiro, he posted this in the “Learning PHP” section, give him a break and don’t waste our time with your crazy posts! They are okay for experienced people like me, but, for learners and beginners you are wasting everyone’s time!

:o

To: ErnieAlex, ah, it’s PHP then ErnieAlex. Not 'Copy and paste off someone elses site and try to get someone else to get it to work"? Good, then I’m in the right place.
Look at the last line ErnieAlex.
[php]

© Copyright <?=date("Y")?> - Powered By NewsBook
[/php] Good thing this is 'Learning PHP' so I simply pointed him to the sourse.

Yes, Ojoshiro, I agree with you about the copyright comment. But, are you not here to help all? I am.
If Mr. Mooney is nice enough to give starting code to others, why would we not help someone get it working?
Perhaps I do not understand your side of this. Sorry again if I offended you.

Ara, after fixing the action clause in your form, did your code work?

When the login button is pressed, it is processed by a JQuery script, which embeds that login form into the index page (within a new DIV, which is an overlay).

The reason why no action is provided is because the index page does the processing of the form, because it assumes that the form will be embedded into the index page.

The actual code that deals with the login is located within the system.php file.

Thank you very much, Dale. I have not had time to install this on my test system to resolve it for Ara.
Glad you saved me from having to do that. I have way too many to clear out as it is… LOL

Since that file was not posted, we would have never knew that was the answer. Hope Ara can sort it out!

Thanks again!

No Problem

Happy to help :slight_smile:

Thanks Dale and thank you very much ErnieAlex, am really gratefully. I don’t full understand Dale’s explanation but am really grateful you both took out time to respond to my question

Well, Ara, He is saying that the file “system.php” handles the login code, I think.

So, basically, Dale’s project is a “canned” system. It comes with everything already there for you.
You just have to alter some basic items. Look in the documentation that came with it and it should
tell you what you need. Or, go back to his site and read the FAQ’s on this system.

Good luck!

Sponsor our Newsletter | Privacy Policy | Terms of Service