chrishea 182 Nearly a Posting Virtuoso

Browsers don't do everything exactly the same and they aren't all as strict in enforcing the rules. Generally speaking, if you follow the rules and code your html and css properly, then all of the browsers, except for Internet Explorer should display something very similar. Internet Explorer is often the exception. Sometimes you can find a solution that works in IE and all of the other browsers but sometimes you need special code for IE. If you do a search, you can find more info on that.

Web pages are displayed on screens of all different sizes. If you display your web page in a window (rather than full screen) and you vary the size of the window, you can see the impact of making the page different sizes. Web pages can be a fixed size and left adjusted or centered. They can also expand and contract based on the size of the screen /window. Whatever you do, it's a compromise. The only thing that doesn't work well is when the page is larger than the width of the screen so the user has to scroll horizontally to see all of the content.

You can protect the directory on the server so the list of modules can't be viewed. Users can execute your PHP modules but they can't view them. You would still be better off putting the ID and password in a config file that is included in your program and the variables inserted into your connect …

chrishea 182 Nearly a Posting Virtuoso

The simplest way is to provide a link or a button with a link to the file. It will open the file in the browser (or download depending on the browser and what they choose to do). You don't want to read the file content and actually display it yourself, you let the browser or their local program take care of it.

A slightly more sophisticated version:
http://www.daniweb.com/web-development/php/threads/238034

chrishea 182 Nearly a Posting Virtuoso

You might get lucky and find someone here who has used it but chances are that you will get an answer quicker by going through the documentation on the Social Engine website or by contacting their Support people.

chrishea 182 Nearly a Posting Virtuoso

I have done quite a bit of screen scraping. Some of this has been run on a daily basis to extract data and move it to somewhere else. I decided to capture what I know about this in my help file. You can see it here.

chrishea 182 Nearly a Posting Virtuoso

You gain skills and knowledge by doing smaller projects first (and by looking at other people's code). This includes coding standards and debugging skills. You will also pick up modules and code snippets (and build your own library) that can be used to address specific needs when you do further projects.

If you do a relatively small project and the code is organized so poorly that you can barely understand how it works anymore; you can write it off as experience and even rewrite the whole thing if you have to. With a larger project with many modules, if you don't have a good structure and good standards to start with, then you could end up spending a lot of time creating something that you have great difficulty maintaining or changing when it's done. After spending a lot of time to create this much larger system, you would be very reluctant to throw it out and start over (but your ongoing cost if you don't could be quite high). If someone was designing and constructing a multi-storey building, you would expect them to have some training and experience starting with something small. Is software design and construction so much easier that we can just jump in and do it successfully on a large scale before spending the time to develop the appropriate skills and knowledge? I don't think it is. In both cases, I think that the end result may be something in danger of crumbling.

jbennet commented: good advice +0
chrishea 182 Nearly a Posting Virtuoso

A lot of this (not all) is in the eye of the beholder. Any government, no matter how dictatorial or illegitimate, can brand rebels as "terrorists". Because other countries are hesitant to challenge this because of their own loose definition of terrorism, it seems to now be a way to make suppression of dissent legitimate. The original US colonists who rebelled against the UK could have been branded as terrorists under this loose definition. Also remember that a lot of secret funding for the IRA came from US citizens. There is a lot of political convenience and paranoia involved. Never good to put too much trust in what you get from politicians.

chrishea 182 Nearly a Posting Virtuoso
chrishea 182 Nearly a Posting Virtuoso

What do you mean by "I can't seem to make it work". What is or isn't happening when you try to run it. Where is the plogin.php module code?

chrishea 182 Nearly a Posting Virtuoso

How about

if (isset($row[$z][1])) {
...
chrishea 182 Nearly a Posting Virtuoso

Config files are sometimes put in the root and sometimes in secondary directories. You can protect the file so it can only be read by the system. Maybe someone else will have a different opinion but I don't think that it is any more vulnerable in one place than the other.

chrishea 182 Nearly a Posting Virtuoso

You can do it manually by using PHPMyAdmin.
To read from a spreadsheet in a program, see this.
To export to xls from a program, have a look at this.

chrishea 182 Nearly a Posting Virtuoso

I think that you are probably solving your problem the wrong way if this is the solution. Maybe you should post your requirement and get some feedback on other possible solutions.

Having said that, you can use a variable in the filename for the FOpen statement. It seems like a simple matter to read your file of letter combinations and successively open files with the required names and write whatever is required to those files.

chrishea 182 Nearly a Posting Virtuoso

You need to clarify what you mean. Do you want to display the database value from a past date and time or do you mean that you want to capture the value that is in the database on a specific date and time (i.e. when that date and time occurs)?

chrishea 182 Nearly a Posting Virtuoso

I'm a realist not a pessimist. I've never been clinically depressed and I hope that will never be the case. Realistically speaking, there are some reasons why it is difficult to look at the future of Western democracies with a lot of optimism. Many of these economies are on a downward slope. Quite a few aren't too far from needing a bailout. Many have large unfunded obligations like pension plans. This situation has been building for quite some time but it is far from normal. Economic problems of this magnitude will certainly result in all kinds of problems in these societies. What we don't see is much real leadership. There isn't too much reality or reason for optimism in what we see coming from political leaders. That's probably why we got into this mess in the first place. Politicians of all types have been addicted to spending whether we could really afford it or not. Now the bills are coming due and the cupboard is bare. It isn't going to be pretty!

chrishea 182 Nearly a Posting Virtuoso

If you mean, can internet access be limited to the server and not be available to the local PCs the answer is probably yes. I'll leave it to others who have more hands-on experience to confirm that and provide any pertinent details.

For the second question, I presume that you are referring to mail server software. Maybe someone will have a specific recommendation. Here is a comparison of mail server packages that are available. What you choose depends partly on what you are running under (Linux vs Windows) and what features are important to you.

chrishea 182 Nearly a Posting Virtuoso

You said: "The croped image on server appears correctly".
When displayed with what and from where?

Your display code seems straightforward enough that I would have to suspect that 2 copies of the image are being stored in imagens.caminho. Nothing else seems logical. If that is the case, then you will have to work backward to find out why.

chrishea 182 Nearly a Posting Virtuoso

It's possible that the problem is your css for displaying the image. If it's a background image, it will normally repeat unless you specify that it shouldn't. You can specify "no-repeat" so you only get it once.

chrishea 182 Nearly a Posting Virtuoso

Add another field to your table where you can mark the message as read. Wherever you read a message in your code, immediately update that record and put the "read" value into the new field in that record. In your Select statement add a "where" clause that will ignore any messages previously read (e.g. where already_read<>'yes').

chrishea 182 Nearly a Posting Virtuoso

if you are on a linux system, you can define the permission for the file as 4-0-0 which only lets the system read the file. Some hosts don't allow 4-0-0 so give it the lowest possible permission. If you are under Windows, there must be an equivalent.

Nahiyan commented: Thanks for the hint +2
chrishea 182 Nearly a Posting Virtuoso

That there is a thread called "What New Thing Did You Learn Today??"

chrishea 182 Nearly a Posting Virtuoso

Welcome to Daniweb.

Someone added code tags for you so your code is (now) more understandable. The problem is that you didn't state your specific problem or provide any supporting info as to what you have already tried and what it is supposed to do. If you want someone to help you, then you need to show that you are making some effort and trying to make it easy for us to understand the problem.

chrishea 182 Nearly a Posting Virtuoso

If your web host supports Cron (most Linux hosts do)) then you need to set up a PHP job to select the records and do the emailing and schedule it using Cron. Your web host should be able to provide you with info on how to set it up but it is quite straightforward. If you are running on a Windows host, they should have an equivalent facility.

To do the mailing, you can build it yourself using the PHP mail command or you can use a library that makes it a bit easier (especially if you are sending attachments). More info on that here.

karthik_ppts commented: useful post +6
chrishea 182 Nearly a Posting Virtuoso

That's great. Please mark this thread as "solved".

chrishea 182 Nearly a Posting Virtuoso
chrishea 182 Nearly a Posting Virtuoso

I also tried it and there wasn't an obvious problem (other than the colors!). I chose a few items and then displayed the cart and it showed those correctly.

chrishea 182 Nearly a Posting Virtuoso

Have a look at this:
http://html2pdf.fr/en/default

chrishea 182 Nearly a Posting Virtuoso
chrishea 182 Nearly a Posting Virtuoso

If you don't have any programming background, then you may want to start with some introductory programming tutorials. Also find what you can on debugging because someone who can write some code but doesn't know what to do when it doesn't work is a lost cause as a programmer.

Once you have a handle on the basics, then you can find some PHP tutorials and examples (you can start with W3Schools or just do an internet search). There is lots of sample code and open source programs out there so download some simple ones, get them to run then try making some simple changes.

I have some basic PHP help info here.

chrishea 182 Nearly a Posting Virtuoso

You can find sites dedicated to Open Source and C# with an Internet search. You are most interested in "project teams" so that should probably be in your search terms. The link below is one I found with only a few minutes effort.

http://www.codeplex.com/site/search/openings

chrishea 182 Nearly a Posting Virtuoso

I thought the teachers taught the courses!

If you have a program that presents the form and another that processes the form data, then the simplistic approach would be to take a full form of data, process that and then present the full (empty) form so they can add more. Using just PHP you could also go to the processing module and then link back to the initial module with a parm to tell it how many entries to display. Since they may have already entered some data, you would have to pass back the data they had entered and reload it into the form. Since the number of entries is now effectively variable, it means that the processing module has to be smart enough to handle any number of rows.

If you want the adding of a new row to be handled without actually going to the server to process / pass-back the form data, then you will need some Ajax / Javascript. That's not my forte but I'm sure that you can find something by asking the question in the Javascript forum or by doing an internet search.

chrishea 182 Nearly a Posting Virtuoso

If the mail is sent to GMail, then you can use the PHP IMAP functions to read from GMail. You can find one example here.If you do a search, I'm sure that you can find more.

chrishea 182 Nearly a Posting Virtuoso

One way to get some experience would be to join up with an Open-Source project team (as a developer or a tester or both). It isn't a short-term fix but it might be a way to get some additional development skills and to have something else that's relevant on your resume. You could inquire at the outset who would be able to give you a reference and find out what credentials they have.

chrishea 182 Nearly a Posting Virtuoso

It probably would be easier to find a position in testing / Quality Control. The training that you have had so far could work in your favor but it might not. If you have already had some training / experience in preparing test plans,matrices and cases; and, you can demonstrate that, then that will help. If most of your experience to-date is development with the testing being relatively informal and undocumented then it may not help as much. If the interviewer is looking for a long-term person for the testing function and your main interest is getting some more knowledge and then getting out of testing and into development, he/she may get a sense of that and that may reduce your chances.

It depends to a significant degree on your testing experience and the Company's culture. If you have some applicable experience and if they are looking for a good person for the longer term for the Company not just for a specific function: then your academic credentials and management experience could be seen as a significant asset. If you don't have a lot of exposure to formalized testing methodologies (assuming that the Company uses one or would find that knowledge beneficial), then I suggest that you do some research and learn as much as you can before you go out for any interviews. You also need to be prepared to make a commitment to a testing role for 2 - 4 years. You should also leave the door …

chrishea 182 Nearly a Posting Virtuoso

For every complex problem there is a simple solution that is wrong.
G.B.Shaw

chrishea 182 Nearly a Posting Virtuoso

What would lead you to that conclusion? There are probably hundreds of PHP-based systems that use templates. In addition there are thousands of templates built using HTML, CSS, Flash and everything else you can possibly think of. Rather than second-guess exactly what the question really means, JorJah needs to clarify the question and provide more info.

chrishea 182 Nearly a Posting Virtuoso

Since this is your first post, welcome to Daniweb.

This sounds like a school assignment. If so, then it is up to you to complete the assignment, otherwise you won't learn much and your grade would be meaningless. If you have a specific problem where you need help, then you can post that and someone may be able to give you some suggestions / guidance.

With respect to creating PDF files, you can create the PDF directly in your code using a PDF library or you can create a report in HTML that is written to a file and then converted to a PDF for you. The latter approach is quite easy to do using HTML2PDF. Click here for more info. I don't know of a program that would dump a file to a PDF (unless the file is already formatted as a report using html) but if that is what you need you might be able to find something doing an internet search.

For emailing output, you can use the PHP mail command and set everything up in your program or you can use some pre-defined Functions that will do it for you. I use a library called LibMail that makes it quite simple. You can get more info here.

chrishea 182 Nearly a Posting Virtuoso

Your statement of the problem / questions is not very clear and you haven't provided much information.

  • i just want to if how to put a template in php
    What does "in php" mean? Are you trying to insert the template into something that already exists in PHP or are you trying to add PHP code to the template or what?
  • ,i already have my template and when i used it, I inserted it outside
    What does "inserted it outside" mean? Inserted how? Outside of what?
  • ,local host "restricted access"
    Impossible to know why this is happening or how it is connected to the previous points without more detail and probably some code.
chrishea 182 Nearly a Posting Virtuoso

How about:

  • Proper code tags (code=php)to make it more understandable
  • A better problem definition. Just saying that it doesn't work isn't much to go on
  • Some effort on your part to identify what is different on the two servers rather than just dumping a bunch of stuff and expecting someone else to figure it out for you.
chrishea 182 Nearly a Posting Virtuoso

This is a very common question that has been asked a million time before. A search of Daniweb will show you many previous posts on the same topic. See this link.

chrishea 182 Nearly a Posting Virtuoso

I doubt that anyone can help you without some more detail. I have used the PHP-Excel-Reader successfully with a pretty large Excel file (but it may take a while. See here for more info.

chrishea 182 Nearly a Posting Virtuoso

Do you have a local server installed on your machine? PHP won't run without it. If you don't know what that is click here.

chrishea 182 Nearly a Posting Virtuoso

It helps if you decide what your priority is. There are many web hosts that do a good job but they aren't all exactly the same. I've been using ICDSoft for many years and I'm very happy with them. If you were to compare them with some of the other web hosts you would find that many others offer "unlimited" databases, "unlimited" bandwidth and so forth. ICDSoft doesn't. They offer a good package managed very professionally and backed up by excellent service. Some people have said in past discussions on this topic that they require unlimited databases so they wouldn't use ICDSoft. In that case they should use someone else. There can be a lot of smoke and mirrors involved in the "unlimited" term so if that is important to you, it's best to look a little deeper because there are usually some limits whether they publish them or not.

Getting a recommendation as you are trying to do can be a good way to get a short list. If your needs are simple, then you might be satisfied with any of the companies on the list. If you are going to push the limits, then it's worthwhile to do some extra research first.

chrishea 182 Nearly a Posting Virtuoso

Maybe the fact that there is no semi-colon ending line 175 might have something to do with it!?

iamthwee commented: Okay you get the cookie... +15
chrishea 182 Nearly a Posting Virtuoso

The simplest way would be to change your SQL Select statement's Where clause to exclude any records that are marked as expired. If you still want to see those records for another reason then you can do it in the code:

if($row->expire_date != ...    ) {
   echo "<a href=...
}

Some people seem to prefer embedding little bits of PHP in html code but I find that it makes it difficult to read. My preference is to embed the html within PHP. I find it cleaner to write:

if($row->expire_date != "0000-00-00 00:00:00" && $row->expire_date < $now) {
 echo "
  <td>
  <a href=$link_detail.$row->job_title...
  </td>
 "
endif

If there is a performance impact, it is trivial. I think that the amount of time spent debugging is a lot more important. When you do it this way you may have to escape any embedded quotes (e.g. \") but that's a small price to pay.

chrishea 182 Nearly a Posting Virtuoso

You need to be more specific about what you mean by "repeat" and what it is you want. If you are using the code that you showed previously for word2.php, then it will echo every entry in the table because that is what you told it to do. If you want to select only one row of the table, then you need to add a Where clause to your Select. If you want to read all of the records and do the selection in the code, then you need an IF statement before the echo to choose the one you want.

chrishea 182 Nearly a Posting Virtuoso

There are two main ways that you can pass variables from one module to another. Using a form will pass the variables entered by the user to the module that is identified as the 'action' for the form (as Get or Post variables). The more general purpose way is to use Session variables. These are available to every module as long as the Session is alive (typically until the browser is closed at the user end).

chrishea 182 Nearly a Posting Virtuoso

It's now a day later and the Daniweb menus are still working for me with Daniweb on the AdBlocker white list.

chrishea 182 Nearly a Posting Virtuoso

If COMPANY LOCATION and PHONE are all mandatory fields that will always appear in this order, then I would search the string for those literals and get the position of each. You can then determine the position and length of the company name and the location. For the phone number you will know where it starts and the length should be fixed.

chrishea 182 Nearly a Posting Virtuoso

Saving to a PDF and saving to the database are two totally separate actions even though they can be in the same program. Your ClassII program will receive the output of this form and it can potentially take both actions.

You could save a blank version of the form to a PDF or you could make it a PDF with the fields that were entered by the user. I will assume the latter even though you weren't specific. I suggest that you have a look at HTML2PDF. To make this work, your ClassII program would need to create the form again with the values entered by the user inserted into the form. Instead of displaying it, the form would be saved to a variable and that variable would be passed to HTML2PDF to produce the PDF file.

For the database part, this is standard PHP and MySQL. You get the values entered by the user in the $_POST array and you create an SQL string to insert those values into the database. It's up to you to produce a draft of the ClassII program and try to make it work then come back if you are having a problem. All you've shown us is some HTML so it isn't clear how much you know about PHP and MySQL. If you are familiar with PHP and MySQL then it should be no problem. If not, then you need to find some tutorials and start learning. You can …

chrishea 182 Nearly a Posting Virtuoso

After a very short time, Adblock kicked in again and the menus were gone again. Adblock has a white list so I added Daniweb to it. It then started to display the ads again but so far, the menu hasn't returned. Maybe I will try clearing the cache this time around and then see what happens from there.

[Edit] Cleared the cache - menus now working again. Will see if this is now temp or permanent.