You can use function_exists to prevent double definitions:
if (function_exists("function name") {
function xxx(...) {
}
}
You can use function_exists to prevent double definitions:
if (function_exists("function name") {
function xxx(...) {
}
}
string crypt ( string $str [, string $salt ] )
I am not familiar with mssql or its stored procedures but I believe that you need to upload the file to the server first. That means a form and an input statement with the appropriate Enctype"
<form action=\"$curr_form\" method=post ENCTYPE=\"multipart/form-data\" name=admin>
...
<input type=file enctype=\"multipart/form-data\" name=\"userfile\" >
...
<input type=submit...
</form>
After the form is processed and the file has been uploaded, $userfile (or whatever name you give the file in the form) will be an array that can be accessed either of the ways shown below:
$_FILES["userfile"]["name"] - the name of the uploaded file
$_FILES["userfile"]["type"] - the type of the uploaded file
$_FILES["usefile"]["size"] - the size in bytes of the uploaded file
$_FILES["userfile"]["tmp_name"] - the name of the temporary copy of the file stored on the server
$_FILES["userfile"]["error"] - the error code resulting from the file upload
You can also access the array as $userfile and so forth.
For more info see: http://www.w3schools.com/PHP/php_file_upload.asp
You need a variable to keep the prev application read (we'll call it $app).
As you read through all the z rows, you build two variables (let's call them $emp and $server). Every time you add one, you are giving it a trailing comma. When $app changes, you then drop the last trailing commas and then crank out the actual table line:
echo "<tr><td>";
echo "<a href=AssignedUpdateForm.php?app=".$app.
">".$app."</a></td>";
echo "<td>" . $emp. "</td>";
echo "<td>" . $server . "</td>";
echo "</tr>";
fopen, fwrite, fclose or even simpler, file_put_contents.
I have a new laptop running Win 7 64 bit and it's really great. My old laptop had Vista and I lived with that for three years. I have machines with Win 98 and XP and I also ran my old laptop on XP for a while. There are some differences between the different Operating Systems but the interface is really pretty similar so I don't find that I need any major re-adjustment moving from one to the other. There is obviously an element of personal approach in this depending how much you come to like a certain way of doing things in one version or the other.
It isn't a totally fair comparison (given the newer machine that's faster with more memory) but I have to say that Win7 is so much quicker than Vista (and quicker than XP as well given the newer hardware) that I have zero interest in using anything else. I'm amazed when it starts up and shuts down how quick it really is.
There are a couple of free utilities available that provide additional (menu) customization features that mostly borrow from the Mac:
* You can create 'stacks' with 7stack,
* You can customize a 'dock' using Objectdock (from StarDock)
I also have 'Desktops' (from Sysinternals) that allows me to run up to 4 virtual desktops and flip back and forth. There are a number of these utilities out there. This one runs fine in the 64 bit environment …
Is there any point to this post? There are many sites "rating" web hosting providers. Many probably list the ones who pay them. Here is one more with some different hosting companies shown. I think this one may be more accurate than the other one suggested. I use the top-rated host in this list and I believe that they deserve to be rated highly.
I think that you need two select buttons and process them one at a time; or; make the two forms into one. Why does the date picker need to be a separate form?
I am using 5.2.10 with no problems. I tried 5.3.0 and had significant problems with it. The latest Xampp contains php 5.3.1
Since I got my new laptop, I've been using Chrome because it is pretty lean and maximizes the usable area (my resolution is 1366 x 768). It's faster than FF and most of the time, I don't need the FF plugins.
Win 7 runs as well or better than XP. I lived with Vista for 3 years and it is certainly not Microsoft's finest hour. Trying to go to Vista from Win 7 makes no sense.
The first thing I would try is to put it back in the primary slot and try it again. Sometimes, re-seating it is enough to have it recognized. I am surprised that you can't get into the bios and change the boot order. If you have another boot-able drive you might want to try it in the primary slot to see if it will work. If necessary, hard drives are cheap enough that you could buy another one put it in the primary slot, put in your windows cd, let it boot from the cd and see if you can load windows onto the new hard drive. I went through a similar sequence when I was having problems with my dv9200 and it refused to boot from the existing hard drive. I was able to format & load the new disk and I was eventually able to swap the old disk back in and boot from that as well. It wasn't totally logical and there was another problem on the machine but eventually I did get it all working.
... you can remember the days when having someone else to keypunch your program for you was a real luxury, when all testing was done at night and 12k of memory was all we had to work with in a (Univac) machine that filled a room. I'll be really old when I can't remember it anymore.
You could write the code to a file (saving it with a .htm or .php suffix) in a temp directory and then re-direct to that page. You'll want to limit the access to that directory so hackers can't create their own pages there.
There is a default PHP class/object called stdClass. When you define variables this way without first defining a class, it will make them part of stdClass.
If your hosting plan limits you to 5 IDs then that's the most you can create unless they have an option to increase that number. There are a lot of reasonably-priced hosting plans that give you hundreds, thousands or unlimited email accounts.
It has to go in the module referenced by your form "action".
You will need a loop something like:
$i = 0;
while ($i < xx) {
$var = "text_"$i;
$text = $$var;
echo "<br>The value for item $i is: $text ";
$i++;
}
If you have a way of knowing when you have reached the end, then you can use it. Otherwise, you'll just have to loop up to some number higher than the max you expect.
I presume that you do have a <form> and </form> outside the scope of what you have shown.
In your second module that will receive the fields, you have to treat your $text_n variable as a variable variable unless you want to do a lot of hard coding.
Thus, you will need something like:
$var = "text_"$i;
$text = $$var;
You can loop through the range of possible values ($text_0 to $text_n)
and do whatever you wish with each one.
It's the sledgehammer approach but the simplest way may be to do an ob_start(); right after your <?PHP statement and an ob_end_clean(); right before the point where you are doing a re-direct (or whatever...).
You can find some info in the following links:
http://stackoverflow.com/questions/98915/is-anyone-familiar-with-jaxer-im-looking-for-pros-and-cons
http://www.cmswire.com/cms/industry-news/php-vs-java-vs-ruby-000887.php
You can no doubt find more doing a search. Unless you are going to do some really major development you probably want to go with what you already know. If you are basically a js/ajax person, then there would be some simplicity in using jaxer. If you are already comfortable with PHP or Ruby then use that. If you have a specific concern about performance, dev time, maintainability etc. then you will have to factor that into your decision.
Unless you are already an Apache - MySQL expert (or you have one available) you'll probably need to find one in order to get this right.
That's exactly it, don't do that. Don't put the strftime inside the Value. Do it all first before the form (a bit of IF - ELSE). Get the right value in a variable then use that variable in the Value.
If you are looking at 3000 users on a continuing basis you will need a heavy duty hardware and software configuration to handle it. If this is a once per day process (for example), then you probably won't want to invest the time and the cost to build such an environment. There are a couple of links below that address high capacity php-mysql site configurations. You can probably find more through a search. If it isn't a constant requirement, then you probably want to change your approach somehow. Pure FTP may be able to handle a higher volume. Suggest you consult your hosting provider, explain what you want to do and get their input.
http://www.scribd.com/doc/21593/Scaling-PHPMySQL
http://www.vbulletin.com/forum/archive/index.php/t-155366.html
I'm still missing something. If you are always displaying what is in the db and hoping that a null value in the db will be displayed as a blank when the default is to display the current local time, then I don't think you can get there from here. Check the value from the db before you get to the form and only do the strftime if there is a date. Otherwise leave it as null / blank.
You might want to consider reliability as well. Use the link below for a page that provides some comparisons. Toshiba is one of the best, HP is the worst. I have an HP laptop that is almost three years old, has already had a number of repairs and is currently dead. Not sure if I can revive it one more time or not. I would not buy another HP laptop.
http://www.geckoandfly.com/2009/11/18/the-most-reliable-laptop-survey-best-netbook-reliability-comparison/
The reason for your problem isn't clear (at least to me). If you have a value from the DB then you format it. If you don't, then you make the field blank. You then use the result as a value in a type=text field and you should have the right result.
If you want help on this, I suggest that you be specific about the error and what you have already tried in terms of isolating / resolving it. It isn't reasonable to just dump a bunch a code into a post and ask other people to do your debugging. You have a couple of included modules and they could be part of your problem. You probably need to provide info on / a copy of those.
It depends. Based on how you stated the question, the answer could be as simple as:
echo "http://... email.php";
If you have other requirements or limitations, please state what they are.
Could be motherboard. See the link below:
laptop won't boot
The suggested simple test to know if it is or isn't:
If you want to find out if it’s your motherboard...
-unplug hard dive
-unplug ram
-unplug CD rom
-then hit the power button
If the motherboard is working correctly you should get a beep code. This is the motherboard saying "I have no ram in me". If you hear no beep, then the problem is your motherboard.
You didn't provide much info so it is difficult to understand exactly what you need or what isn't acceptable. If you are trying to physically connect with a local fax machine from your PC you might have more of a challenge than just PHP. You don't say why Interfax or something like that isn't an option. If you want help, you need to provide more info.
You can use:
print_r ($_POST);
Just to be sure what it is receiving. If it is there as you believe then you can check line by line after that (echo'ing values where necessary) to see that it is what you expected.
I tried your loop and I got three hits. The code I used was:
<?PHP
$maand = array("11","11","11");
$dag = array("2","4","7");
$jaar = array("2007","2007","2007");
$expert = 265839;
for ($i = 0; $i <= 2; $i++){
$url = 'http://contests.covers.com/sportscontests/picksByDate.aspx?date=' . $maand[$i] .'/' . $dag[$i] . '/' . $jaar[$i] .'&ur=' . $expert . '&contestID=15253&sportID=9&t=0';
echo "<br><b>Reading $url </b>";
$array = file($url);
}
?>
I wasn't able to make it work that way but what did work was to replace the click event with ready as in:
$(".run").ready(function(){ ... });
This should probably have been titled "Auto-start a script". It's my PHP focus coming through.
I'm a PHP guy so I still struggle with Javascript. The answer to this is probably easy.
I need to add some animation effects and I'm experimenting with JQuery animate. The sample routine is set up to run when you click on the Run link. I want to change the routine to run automatically when the page is loaded. Suggestions on what I need to change would be appreciated.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Chainable Transition Effects</title>
<script type="text/javascript" src="../raxan/plugins/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".run").click(function(){
$("#box").animate({opacity: "0.1", left: "+=400"}, 1200)
.animate({opacity: "0.4", top: "+=160", height: "20", width: "20"}, "slow")
.animate({opacity: "1", left: "0", height: "100", width: "100"}, "slow")
.animate({top: "0"}, "fast")
.slideUp()
.slideDown("slow")
return false;
});
});
</script>
<style type="text/css">
body {
margin: 20px auto;
padding: 0;
width: 580px;
font: 80%/120% Arial, Helvetica, sans-serif;
}
a {
font-weight: bold;
color: #000000;
}
#box {
background: #6699FF;
height: 100px;
width: 100px;
position: relative;
}
</style>
</head>
<body>
<p><a href="#" class="run">Run</a></p>
<div id="box">
</div>
</body>
</html>
This question comes up regularly and most people will point you at the most popular ones such as Joomla, Mambo, Drupal or Wordpress because that is what they are familiar with. Being popular means that there may be more choice of templates and plugins and that may be important to you. As you found, there are many many others and some of those may have some specific advantages over the better known systems. I have been using a system called Website Baker for many years. It is very straightforward to understand and change. It is very easy for non-technical people to use to maintain a site. I suggest that you include it in your evaluation.
Chris
Have a look at these systems:
http://www.sourcecodeonline.com/list?q=php_restaurant_reservation_script
Cell phone providers allow you to send to send SMS messages to cell phones by using a format of the form nnnnnnnnnn@telco.com where nnn... is the cell phone number and telco.com is the specific website address for the telephone company in question. This means that you need to know the company for each cell phone in order to create the email address. Many / most do not allow the phones to send a reply.
If you want a two-way service, you can use a gateway provider. Examples are http://www.smsgateway.ca/ and http://www.clickatell.com/
The code to confirm the registration and provide a password would be the same as you would use to send to an email address (except you may have to add some code for the API to the gateway). You can find a tutorial on this at:
http://www.tutorialcode.com/php/registration-script/
Php has some specific commands (fgetcsv fputcsv) to read and write csv files. If you have spreadsheet data that you want to upload, it is somewhat simpler to upload and read it as CSV than it would be to read it as an XLS file. You can also create a CSV file from PHPthat you can then read into Excel.
It's possible that your power jack is loose so it isn't making good contact with the motherboard and you aren't getting any juice. The jack in the machine could also be faulty. If it starts up and then almost immediately shuts down or if it won't start booting at all, this might be your problem. If you can hold the power cord (male) jack and move it around so it doesn't seem like a solid / tight fit, then that would be a sign.
This is apparently fairly common on at least some HP's. I have a dv9201 and I have that problem. Right now the power cord is taped into position with duct tape and that is keeping it running until I rip it apart to fix or replace the jack.
So where do we find the include file?
That should work fine. I have done this sort of thing to prevent a double definition of a function as in:
if (!function_exists('abc')) {
function abc() {
...
}
}
What you may want is one or more Accordion sections that open when you click on the header. Have a look at this page. It has an example so you can see if that's what you want. If so, there is some code there you can use.
Start-up problems where the system won't get through the POST process are usually caused by some sort of hardware issue. Hibernation and maybe being in the middle of the update restart process may complicate it. I have an HP laptop and my problem started when I put it into hibernation mode and it wouldn't recover. If your machine is set to restart after an error, then it may just keep shutting down and restarting in an endless loop.
In HP laptops, there are problems with the solder connections to the NVidia video card caused in whole or in part by high heat. The system detects a problem and won't finish the boot. Dell's may not have this exact issue but you could have a similar heat-related problem or it might be some other type of hardware-related problem.
I suggest that you try re-seating your memory cards and maybe even try starting with just one and then the other (if you have two). You can also try re-seating the hard drive. Besides my main problem which is probably solder-related, I still have situations (as recently as yesterday) where I have to re-seat my hard drive to get the machine going. I have two drives and this only seems to happen with the newer one.
I will provide a link to my blow-by-blow problem and partial resolution below. I have been able to continue using the machine by re-booting holding down the DEL key until I get the vendor …
There are lots of resources out there so you just have to do a bit of searching. The link below leads to a lot of programs in this general category. You may find one that does exactly what you want but if not, you can probably use one of them as a starting point and add whatever else you need.
Using PHPMyAdmin is the easiest way to do it. If you need to have customized processing then you can try the Google Excel reader at:
excel_reader2