Forum: PHP 28 Days Ago |
| Replies: 6 Views: 374 |
Forum: PHP Oct 24th, 2009 |
| Replies: 4 Views: 542 You can't pass url parameters to a php script through cron.
If you need to store something to be used in a cronjob later, your best bet would be either to use a database or a text file. |
Forum: PHP Oct 21st, 2009 |
| Replies: 6 Views: 374 I got bored and wrote code to echo out the actual string. Only took 10 minutes.
I ended up getting 21224 not 21124. Maybe I overlooked something.
$ones = array(
1 => 'One',
2 => 'Two',... |
Forum: PHP Oct 20th, 2009 |
| Replies: 5 Views: 239 I use a mixture of both. Kind of.
All my calls a centralized around index.php. My url rewrite changes urls like http://www.mysite.com/page/index to index.php?url=page/index. Then my url class... |
Forum: PHP Oct 17th, 2009 |
| Replies: 50 Views: 4,940 So many people have asked for this code so I have updated it. Before I post the source I need to test it. Anyone willing to help?
The demo site is: http://www.box201.com/~kkeith/chat/ |
Forum: PHP Oct 17th, 2009 |
| Replies: 6 Views: 669 You could extend it, but every time you called a class a new connection to the database would be made (which isn't good).
I would use the singleton method. |
Forum: PHP Oct 15th, 2009 |
| Replies: 107 Views: 3,466 Both players are ok. The default.html one has that flvplayer image in the upper right hand corner which is annoying.
As for the content of the tutorial, I have noticed some errors.
The entire... |
Forum: PHP Oct 14th, 2009 |
| Replies: 107 Views: 3,466 It works. The quality is ok.
The video cuts off though. The entire tutorial is not there. |
Forum: PHP Oct 14th, 2009 |
| Replies: 107 Views: 3,466 If you can't get anything else to work, try another player.
Another I have tried is http://www.longtailvideo.com/players/jw-flv-player/.
It worked, but there was something about it I didn't... |
Forum: PHP Oct 13th, 2009 |
| Replies: 107 Views: 3,466 I will get opera and try it. Do you have the flv file available online? |
Forum: PHP Oct 13th, 2009 |
| Replies: 107 Views: 3,466 I don't have any software recommendations. I haven't used many of them that actually worked. There are some online ones that work. Most of the time I use ffmpeg to convert the files when the are... |
Forum: PHP Oct 12th, 2009 |
| Replies: 5 Views: 542 Pointless, the cgi and sql classes are not included. The code isn't even xhtml compliant. Why even post this? |
Forum: PHP Oct 11th, 2009 |
| Replies: 107 Views: 3,466 Try Debut Video Capture Software. It was free and did more than I expected it too.
In the tutorials, make sure you are using proper practices. I don't want to watch them and then see stuff that is... |
Forum: PHP Oct 3rd, 2009 |
| Replies: 1 Views: 302 I use list and explode.
list( ,,$value ) = explode( ',','one,two,three,four' );
echo $value; //returns three |
Forum: PHP Sep 30th, 2009 |
| Replies: 11 Views: 3,690 If you are wanting a better login script look here:
http://www.daniweb.com/forums/post951182.html#post951182 |
Forum: PHP Sep 11th, 2009 |
| Replies: 14 Views: 441 In terms of online security, the only way a hacker can get into your site is a lack of proper coding practices. If the security is there, they won't get around it. Pretty much everything is... |
Forum: PHP Sep 11th, 2009 |
| Replies: 30 Views: 1,166 Very true. All sensitive data should be stored above the web root. Along with classes and other functions. Think if something happened to the server and it stopped parsing php and your code was... |
Forum: PHP Sep 10th, 2009 |
| Replies: 13 Views: 1,703 You really think cellphone companies are going to let you send free messages through their equipment. Not going to happen.
SMS providers buy a bulk of messages from those companies at a... |
Forum: PHP Sep 2nd, 2009 |
| Replies: 5 Views: 326 This is how I would do it:
$lower = true; //if you want lowercase letters
$t = 4;
$s = 1;
while( $s <= $t ) {
$i = ( $lower ? 97 : 65 );
while( $i <= ( $lower ? 122 : 90 ) ) {
echo... |
Forum: PHP Aug 28th, 2009 |
| Replies: 8 Views: 339 My script goes on its own page called activate.php.
In your login script you should get the user via a username/email which you have probably already done.
ex.
$username =... |
Forum: PHP Aug 17th, 2009 |
| Replies: 13 Views: 1,336 Here is something I typed up a while ago. Its a complete login and registration system. Just create the following pages and create the database and tables. After that it should work.
This system... |
Forum: PHP Aug 16th, 2009 |
| Replies: 2 Views: 209 You have parenthesis around the REMOTE_ADDR.
It thinks you are trying to call a function with the name of the value of $_SERVER (which is an array) thus causing your "function must be a string"... |
Forum: PHP Aug 12th, 2009 |
| Replies: 4 Views: 234 Your problem stems from that the fact that php will try and convert anything that is not a number into a number when trying to add it (the +=). Most of the time, it just turns into a nice 0. Remove... |
Forum: PHP Jul 20th, 2009 |
| Replies: 20 Views: 1,190 You will have to modify the code and maybe your database.
Pretty much you will need to use humbugs' solution.
In the cron file you will need to select all users that have not been active for... |
Forum: PHP Jun 25th, 2009 |
| Replies: 12 Views: 1,205 You haven't defined $siteconn within the function.
Mostly likely you need to put global $siteconn at the top of the function.
function CreateMenu($main, $limit) {
global $siteconn; |
Forum: PHP May 17th, 2009 |
| Replies: 14 Views: 898 It should work then. Something else has to be wrong.
add this: or die(mysql_error()); to the end of the mysql_query function. That way you can see if there are any database problems. |
Forum: PHP May 13th, 2009 |
| Replies: 5 Views: 794 What about the array_count_values() function? I have never used it, but I seems to be what you are looking for.
Does anyone on this forum check php.net at all?
Here is the hard way:
$array =... |
Forum: PHP May 8th, 2009 |
| Replies: 6 Views: 537 Here is an session login example I made a few months ago.
http://www.daniweb.com/forums/post832028-20.html and http://www.daniweb.com/forums/post832231-23.html
Take a look and see if it clears... |
Forum: PHP May 2nd, 2009 |
| Replies: 8 Views: 1,366 Please at least google your question before posting here.
http://www.google.com/#hl=en&q=create+folder+with+php&btnG=Google+Search&aq=f&oq=create+folder+with+php&fp=OlAWEoQSgPM
mkdir() is the... |
Forum: PHP May 2nd, 2009 |
| Replies: 18 Views: 8,069 This is something I just typed up. Not the same as the one I get to the other poster, but close.
It will read a folder and get the images. Then randomize them and display in a paginated form.
... |
Forum: PHP Apr 26th, 2009 |
| Replies: 6 Views: 431 Do you get an error with this code?
if (!$_POST['username'] | !$_POST['pass'] | !$_POST['pass2'] ) {
die('You did not complete all of the required fields');
}
The single | makes me... |
Forum: PHP Apr 8th, 2009 |
| Replies: 7 Views: 1,201 You are not sending the managers id in the confirmation form. You have $mGinNo = $_POST['mGinNo'];, but there is no 'mGinNo' in the form. |
Forum: PHP Apr 4th, 2009 |
| Replies: 15 Views: 625 the & is for reference, so when it runs that function on the values, it will updated the real $_GET array. you don't need to put it into a variable.
its the same as doing
$_GET = array_map(... |
Forum: PHP Mar 26th, 2009 |
| Replies: 4 Views: 377 This should do it:
$result1 = mysql_query( "SELECT * FROM `tabe1`" );
$table = '<table cellpadding="3" cellspacing="0"><tr>';
if ( mysql_num_rows( $result1 ) > 0 ) {
$i = 0;
while(... |
Forum: PHP Mar 24th, 2009 |
| Replies: 25 Views: 1,141 PHP/MYSQL USER REGISTRATION AND LOGIN EXAMPLE
Database table
-------------------------------------------------------------
Todo - Create this table in your database
CREATE TABLE `login` (... |
Forum: PHP Mar 24th, 2009 |
| Replies: 3 Views: 490 that won't stop all urls. http://google.com would work.
for a simple solution, change "/www/" to "/(http:\/\/|www)/" |
Forum: PHP Feb 17th, 2009 |
| Replies: 7 Views: 1,757 i would use the onsubmit attribute in the form tag for this.
<form action="something.html" method="post" onsubmit="return confirm('Are you sure?')">
<input type="submit" name="submit"... |
Forum: PHP Feb 17th, 2009 |
| Replies: 4 Views: 694 here is how i would do it
echo '<select onchange="javascript:window.location.href=this.value">';
for ( $i=0,$i<$pages,$i++ ) {
echo "<option... |
Forum: PHP Dec 11th, 2008 |
| Replies: 4 Views: 455 i recommend using the $_SESSION array to register session vars. anyway, you are declaring the variables after the redirect occurs, so they are not even being set at all.
make sure you add the info... |
Forum: PHP Dec 4th, 2008 |
| Replies: 6 Views: 1,096 the reason the first one didn't work was because you have to set the variable with the title you want before trying to echo it.
just put the title in the head section. at the top of the page add... |