When they logout you could close the current window and open a new window with the logout / login info.
When they logout you could close the current window and open a new window with the logout / login info.
Yes. It can basically handle anything that you can put into HTML.
It's actually pretty easy. Based on the first example they provide with the package, here is the code with a few extra comments
<?PHP
// first get the html that is to be converted
// they have them all as separate files but it could be a variable that you
// built within this program
ob_start();
include(dirname(__FILE__).'/res/exemple00.php');
$content = ob_get_clean();
// conversion HTML => PDF
// you need to include the class module and then give it a few commands
require_once(dirname(__FILE__).'/../html2pdf.class.php');
try
{
$html2pdf = new HTML2PDF(); // you can use the default parms
$html2pdf->setDefaultFont('Arial');
$html2pdf->writeHTML($content);
$html2pdf->Output('example00.pdf');
}
catch(HTML2PDF_exception $e) { echo $e; }
?>
I think that Arial is the default font so you probably don't even need that. The key to getting it converted is to give it valid HTML. That means that it needs opening and closing tags for html statements. It does a pretty good job but it doesn't handle everything. I've done some of my own examples to understand the features better. I suggest that you do a little experimenting as a way of learning it better. If you have a specific problem I may be able to help.
With respect to mysql: if that's where you want to save it, then I think it would be simpler to save the HTML (probably in a blob field). I think that the html will probably take less space and you can easily re-create the PDF when you need it. This facility is made to produce …
If you look for the British flag on the upper right of their home page it takes you to the english version.
Converting to PDF isn't too difficult:
You will need to save your output into a variable and then pass it to HTML2PDF to convert it. Saving to MySQL is up to you. Saving to a file is probably a bit simpler. If you need to save it to a database then you have the choice of saving the report output in HTML and converting to PDF when you need to, or, saving it as a PDF directly.
Prince,
Your statement needs to include:
PRIMARY KEY ( `id` )
)
As the error says, the auto column must be defined as a key. Suggest that you use PHPMyAdmin and so a sample create first (building the structure not by entering an SQL statement). It will tell you the SQL statement that you need.
Two points:
1. Keep your code simple unless you are really good (in which case you shouldn't be coming here asking for help).
2. The first skill is understanding the language syntax and writing the code. The second skill is learning how to debug so you don't have to come here asking basic questions. You seem to be getting there on the first part but you need to work on the second part.
Your code has some syntax errors but I presume that you knew that. Your statement on line 6 is more complex than it needs to be and you have an error buried within it. I changed it to make it simpler and I made one important change:
$wk = explode(".", $fileName);
// end;
if (in_array($wk[1],$allowedExtensions)) {
return $wk[1];
}
else {
echo "<br>Not Found ";
}
and that works. The explode is putting two elements in the array (and you want the second one). Not sure why the end statement was there but it doesn't seem to be needed.
Simpler code allows you to see what is happening more clearly. If you don't see an obvious problem, then you need to insert some debugging statements (just an echo or something fancier if you are using some sort of debugging package) to see what results you are getting at key points in the program. If you do that, in most cases you will figure out your own error.
What is your reason for saving everything to one row? It would be simpler to save each one as a separate record. Then, the counting and checking for duplicates is quite straightforward. If you append everything to one record, then you have to read that record every time, break up the content and check against each one in the program. You will be using the database like a flat file and losing out on its capabilities.
I built a system like that for use on a much larger and broader scale. It is sold as a service so the actual system isn't for sale (and would be much more than you need). If you can find a system that does most of what you need, that will certainly give you a head start. I have been working on my system and continue to find new things to improve or add after 5 years of development. Your other option is to look at something like Team Pages where you just pay something to use their service.
You can see some available systems by clicking on the link below:
http://lmgtfy.com/?q=sports+league+php
I am working on getting info from an ASPX https site that requires a login at the front-end. I did some screen-scraping in the past using the class_http library by Troy Wolf and that worked very well. Unfortunately, ASPX uses javascript and postbacks and it becomes very complicated. I spent two or three days researching different tools and trying them but I couldn't get anything to work.
In the end, I gave up on trying to do it with PHP and I used the AutoIt tool instead. Autoit is a (free) basic-like language that has a wide range of library routines for automation within the Windows (desktop) environment. The results have been great. Autoit has IE functions (and some for FireFox and Opera that are less capable) that work from outside the Browser so they still let the browser do its normal thing dealing with the Postbacks and so forth. In less time than I spent researching PHP tools I had something up and running. My first project was to extract data from a site and update a database on my server. For the receiving side, I built a custom PHP module so my Autoit program was talking to the ASPX program server and then to mine for each record transferred. To further automate it, I set it up on the Win7 task scheduler so it starts this job automatically every day.
Autoit can produce an executable version (exe) so you can produce a module that you can …
You should be able to do this using an include. You can put an If ahead of the include and decide which module to include based upon your specific criteria.
You need to provide the details of how the window is being opened.
As Ardav said, you are getting exactly what you asked it to do. If the action on your form is contact/retreat.php then you will only get the contact form (and that is what is happening). You have two basic choices:
1. Make http://naniboujou.com/retreat.php the action on your form; or,
2. Create a whole new page that you will use as the action for the form with a layout the same as http://naniboujou.com/retreat.php
If you are interested in flash, then you are in the wrong forum. You should probably be posting in:
http://www.daniweb.com/forums/forum28.html
Normally, you only get the emails that bounce back because of a bad address (coming back to the sender email address). Some systems have the ability to request a confirmation but I don't see this used much any more and it requires the user at the other end to willingly confirm it (which many won't). With the exception of bounce-backs, I think that you need to consider email to be a one-way process and you won't ever know how many really got opened.
fuston05,
As mentioned a couple of times, you will get the benefit of a lot of good Javascript work by using JQuery. I have used it very successfully without any great understanding of javascript. Personally, I find Javascript more complicated than PHP so I'd just as soon let someone else take care of the details. Most common things have already been developed more than once as JQuery Plugins so you have a wide choice of all sorts of effects. Ajax is useful if you want forms fields that react to what you enter without refreshing the whole page but it isn't intended to address the wide range of features that you get using a Javascript library like JQUERY.
If I understand what you are trying to do correctly, I think that you need two hidden variables with consistent names. For example:
echo "<input type=\"hidden\" value=\"".$data['id']."\" name=\"id\">";
echo "<input type=\"hidden\" value=\"".$data['name']."\" name=\"name\">";
You can then access them as id and name in the receiving program.
Be careful using single quotes since php doesn't do substitution for variables within single quotes.
It depends what the captcha is doing. If you get to the "action" page for your form before the captcha is verified, then you can save the variables into Session variables or make them hidden variables attached to a "Back" button to go back to your form.
If I can go back to the version 2 back before you changed it, you seemed to be on the right track. Assuming that dbform.php is the module that you have provided above, then it it going to call itself and redisplay the form so you might want to change that to only display the form the first time (you can check if re_pre or re_live has a value). You also have "selected" on every option statement. Normally, you would only put it on one or not use it all. On your option statement you also have value='$i'. Normally php doesn't substitute variables within single quotes but given that the whole statement is within double quotes, I'm not sure if it will or not. You can also use value=\"$i\".
Not sure if any of this will fix your problem but it will be a cleaner starting point. I would also put:
print_r ($_POST);
right after the <?PHP statement to show you what has been Posted and passed to the module.
You can try that and then see what you get.
Which is better for your needs, a van or a 4 door sedan? Without more info, the only real answer is "it all depends".
You don't need to choose because you can use both. Some things can only be done in Javascript but having that within a PHP context gives you the server side with a database and so forth. I have used JQuery within PHP programs and that works quite well and allows you to have the best of both worlds.
First of all, even though Joomla is written in PHP, this isn't a Joomla forum. Second, if you want an answer, you need to provide enough info and show what you have done so far to investigate or fix it. You give no indication if this is a stock version of Joomla or if it has a bunch of add-ons and you didn't even include the release of Joomla that you are using. You didn't indicate if Joomla was ever working or what you did just before it stopped working.
It looks like this may be a joomla plug-in for unfinity. You have a better chance of getting help from a Joomla forum or from a forum for the specific add-on that may be giving you a problem
You haven't defined a form! Before you start generating Select and Option statements, you need to define a form (<form action=xxxx, method=post>) where xxxx is the module that will receive the form output (it will default to the same module that creates the form). At the very end, you will want to add a submit button and a closing </form>.
If you aren't familiar with forms, then do a search and read some tutorials.
Where is $_POST["DB_Backup"] coming from (and what do you expect it to contain)? Your first module has a select statement but it doesn't have a form definition. To further complicate it, you are including that first module into the second one. If your first module had a form with the action being the second module, then you could reasonably expect that $_POST["DB_Backup"] would contain the value selected from the drop-down list and you could access that in the second module (which would no longer have the include). As it is, you have structured it incorrectly or you have a much better knowledge of shortcuts than I do but now you're caught in your own web.
If you are doing it just to learn PHP, then w3schools is a place to start in order to learn some of the basics. If you are doing it because you would like a working website sooner rather than later, then I suggest that you use a Content Management System (CMS) instead. If you aren't already familiar with setting up an application in a web environment, then this is knowledge that you will need to have to test and run php programs anyway.
Suggest that you set up a local test environment using one of the available (LAMP) packages such as Uniform Server, XAMMP, WAMP or EasyPHP. These are open source packages that you can download and install on a Windows PC. Once you have that set up, you should be able to create a "Hello World" PHP program and run it under the local server that you have created.
If you have some programming experience in another language, then I would suggest that you download a few relatively simple PHP programs (go to Hotscripts or search the Web) get them to run in your local test environment and then examine the code and try to understand how they work. I also suggest that you download the PHP reference manual and keep it handy. You will also want a development IDE that can do syntax checks for you on PHP code. There are a number of them out there. You can try the PHP version of Netbeans. My …
Why are you checking for >1 on line 37. I would think that you'd want to check for >0. As it is, your insert may fail because there is already one on file.
I ended up rebuilding the .css file for all of the non-IE browsers and got everything working OK, then I went back and built a totally separate style definition for IE starting with the original file. In the index file (in php) I choose which style file to use based on the browser. This was simpler than trying to keep it integrated in one file.
Everything is pretty much working now. Most pages that I have built in the past using tables have the ability to expand and contract with the size of the screen but I found that this was a problem here because the floating right column would get pushed below the center block in some cases. I ended up using fairly fixed sizes and I used a min-width and max-width that are pretty much the same. As a result, when the window goes below the width of the blocks, it doesn't try to compress the content, it just doesn't show everything and adds a scroll bar at the bottom.
The current approach is a compromise that I'm not fully satisfied with. On a very wide screen, the page is left adjusted and could leave a lot of extra space on the right hand side. It might be better if it was able to expand somewhat or maybe if it was centered on the screen with free space on both sides.
There are two ways to do the .htaccess depending how php is set up:
For web servers using PHP as apache module:
AddType application/x-httpd-php .html .htm
For web servers running PHP as CGI:
AddHandler application/x-httpd-php .html .htm
The syntax is a bit different than what you had but the main thing is that only one of them will work depending on the setup. You can try both and see what works.
There are two ways to do the .htaccess depending how php is set up:
For web servers using PHP as apache module:
AddType application/x-httpd-php .html .htm
For web servers running PHP as CGI:
AddHandler application/x-httpd-php .html .htm
The syntax is a bit different than what you had but the main thing is that only one of them will work depending on the setup. You can try both and see what works.
I wanted my own cart to potentially handle multiple affiliated vendors on the back-end, including Amazon. I had to change the cart program to be able to link directly to the vendor's page rather than use an internal page to show the details of the item. I am not familiar with Zen Cart but you will have to check if it has the same capability (probably not because I don't think many carts are set up to front-end Affiliated merchants).
This may be as good as it gets even though it is fairly basic:
http://www.phpclasses.org/package/388-PHP-Convert-any-document-that-can-be-read-by-MS-Word.html
It probably won't handle docx files.
I think you need an else on line 17 before you show him as logged in.
Sorry, I don't understand what you are trying to accomplish so unless you can explain it differently, I give up.
If you want to search on the month, then you probably need something like:
Select * from $table where departure like '$month/%' order by departure
Creating a chat bot is a pretty challenging project. It might be a very long and frustrating project for someone who doesn't already have pretty good PHP and MySQL knowledge and preferably some knowledge / experience with artificial intelligence. It is possible in PHP and MySQL and the good news is that it has already been done! There are some open source systems out there that you can download and try. They may not do everything that you want, but it will give you a start with something that already works. You can learn by examining what was already done and when you're ready for it, try making some changes and additions. Once you examine one of these systems, you might decide that you're not ready to tackle something that large / complex but you'll already have something that works anyway.
Have a look at my previous post where I provided a couple of references. You can probably find more with a search.
http://www.daniweb.com/forums/thread269327.html
Matty,
The search that you saved has the parameters (e.g. search=Kim) as part of the string. If you want to start from scratch with a new search then the string should be:
http://bluelinedown.netau.net/new_test.php
Instead of:
I haven't found a way to open a Word doc from your program and consistently retain all of the formatting:
You can open PDF, Powerpoint and TIFF files using an embedded Google Docs Viewer
There are a number of ways to open spreadsheet files.
There are a couple of utilities that will extract text from your Word document but this isn't that same as a reader to display the original document.
You should be starting a new thread. Your problem isn't the same since this original thread was about downloading and you are asking about uploading.
I haven't used it myself, but Uniform Server is promoted as a LAMP stack that you can use for a production server.
There are a couple of systems that you probably want to look at if you are serious about this:
PHPLicengine seems to be pretty complete with respect to licensing. It does also seem a little bit complex to understand so you would probably need some time to experiment with it. You can install a demo copy but it didn't seem possible to do it in a local test environment so you probably need to put it on the same server you would eventually want to use it from (if you decide to buy it).
Ioncube is a pretty good PHP compiler / encrypter. You need to use this to hide the licensing and protect the code. I did quite a bit of investigation of the various options and I came to the conclusion that this is probably the best one to use. One benefit is that you can use it through their website to encrypt modules as a demo or on a pay-as-you-go basis. Source Guardian and Zend have similar encryption capabilities but the pay-as-you-go seems to be unique to Ioncube. You will find many other encrypt packages out there, but most of them can be pretty easily broken. I believe that only these three actually produce byte-code which is a semi-compiled module that needs a run-time module to decrypt it. Most servers already have the ones for Ioncube and Zend. Apparently, these can be broken as well but it is more difficult.
…
Suggest that you echo each of the variables to see if they are what you thought they were.
I looked at this site and I don't see any working drop-down menus.
I'm not prepared to spend the time doing the debugging that you need to do. Maybe someone else is but that may be why you don't have any responses yet. If you at least showed what was working and then specifically what you changed, there might be a chance that someone would spot something wrong in the changes.
You can upload the file and then use something like Excel Reader to get the info out of the spreadsheet.
sleep(30);
There are a lot of security limitations on what you can see on the local machine, certainly in PHP and even in Javascript. I don't think that you will be able to view a local document but nothing stops you from uploading it (manual file choice by the user) and then verifying it on the server. You could write a cookie once it is verified so the next time, you would check the cookie instead.
You can't echo an array, it isn't that smart. If you want to dump it, you can use print_r. If you want to do your own formatted display then you need to spin through the array pulling out the values and displaying them or referencing them individually (e.g. $_SESSION[0] )
Most things have been discussed previously so it is worth doing a search on Daniweb to see if there is anything in the archives that might answer your question.
This post has some suggestions:
http://www.daniweb.com/forums/thread39005.html