Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Date("d")-1 Does Not Work On The 1st Of The Month


Clearly the sql statement below will not work properly on the 1st of the month. The only way I can think of to fix this is using php's mktime(). Is there a better way to fix it?
Code:

$sql = "SELECT COUNT(id) FROM bonds WHERE applyDate = '".(date("Y")."-".date("m")."-".(date("d")-1))."'";




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Failed To Connect To Mailserver At "localhost" Port 25, Verify Your "SMTP" And "smtp_port" Setting In Php.ini
Warning: mail(): Failed to connect to mailserver at "localhost" port 25,
verify your "SMTP" and "smtp_port" setting in php.ini

in php.ini I have:

SMTP = localhost
SMTP_PORT = 25
SENDMAIL_FROM = NULL
SENDMAIL_PATH = "H:WINNTsystem32" (this is where sendmail.dll is
sitting. H is the drive with w2k)

Other PHP code on that page is working.

What else should I check?

Populating "Month" Dropdown Menu
I can get the current month to display in a text box by inserting
value="<? print strftime("%B"); ?>"> into the code for that
particular text box on a form but how can I populate a drop down with
names of all the months with the current one being 'default' as it
would be in the text box example?

'echo "": No Such File Or Directory" Error Using "exec" To Pipe In PHP Script
[TCL]
set php {<? print_r("Hello World"); ?>}
puts $php; # PRINTS OUT <? print_r("Hello World"); ?>
puts [exec "echo '$php' | php -q"]
[/TCL]

When I try this within TCL I get the following error:

Mail() Won't Work; Server Says "Unable To Authenticate User..."
I am working on a sendmail script using the PHP mail() function.

If I click on the HTML form page from within my hosting control panel (while I'm logged into my hosting account), fill out the form, and then click on the "submit" button the mail sends just fine.

However, if I log out of my control panel and approach the form page, just like a visitor or stranger would do, the PHP mail() function will not send the mail.

If I look inside the "./tmp/mailError.log" file there is the following message:

"Unable to authenticate user. Message not sent."

It appears that the server will not send the mail because there is not any identification for the outgoing mail. I have tried inserting a fourth variable in the PHP mail() function a couple of different ways like so:

How Do I Do Something Like $color = ("red", "yellow", "blue")[$colornum]?
How do I take an index of a literal array, instead of a variable?

That is, say I want to get the short name of a month. Can I do
something like:

$monthname = ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec")[$month];

or do I always have to do:

$blah = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec");
$monthname = $blah[$month];

It seems a shame to have to create a variable specifically for this
one-shot purpose.

Problems Getting "require" To Work In PHP5 Under Apache2
The require() I'm using in a PHP script has stopped working after I
moved from PHP4 and Apache 1.3.x to PHP5 and Apache 2.x. Now I get
messages like this:

Warning: main(/includes/ReloadScript.html) [function.main]: failed to
open stream: No such file or directory in
/usr/local/www/htdocs/main/AOLCompression.php on line 14

Fatal error: main() [function.require]: Failed opening required
'/includes/ReloadScript.html' (include_path='.:/usr/local/lib/php') in
/usr/local/www/htdocs/main/AOLCompression.php on line 14

I've seen references to the problems, but no workarounds or solutions.
What's the status? Is there a way around it?

.htaccess "ErrorDocument 404" Not Work For Files Ending .PHP
I'm hosting with 1and1 and have created an .htaccess file which correctly sends missing page lookups to a specified page, but if the missing page ends with .PHP .PHP5 .PHP4 a generic 1and1 page appears and ignores my ErrorDocument.

Perhaps there needs to be something extra in the .htaccess file?

If you can email me I'll send you a working and failing url so you can see.

....
My .htaccess file below:
#
# .htaccess (site root directory)
# Apache & PHP Settings
#

# Protect files and directories
#order deny,allow
#deny from all

# Options
#Options FollowSymLinks

# Re-direct Site Errors
ErrorDocument 400 /error.php?errordoc=400
ErrorDocument 403 /error.php?errordoc=403
ErrorDocument 404 /error.php?errordoc=404
ErrorDocument 500 /error.php?errordoc=500

# Tell 1and1 to use PHP5 by default
AddType x-mapp-php5 .php

# Save Bandwidth
# 1and1 not functional

#<ifModule mod_php4.c>
#php_value zlib.output_compression 16386
#</ifModule>

# Rewrite URLS
# note: [NC] nocase (case insensitive)
# prefix z makes the items more unique

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^zcat(.*)_p(.*)_size(.*)$ item_cat.php?cat=$1&page=$2&image_size=$3
RewriteRule ^zcat(.*)_p(.*)$ item_cat.php?cat=$1&page=$2
RewriteRule ^zcat(.*)$ item_cat.php?cat=$1
RewriteRule ^zinfo(.*)_cat(.*)$ item_info.php?item=$1&cat=$2
RewriteRule ^zinfo(.*)$ item_info.php?item=$1

RewriteRule ^friend$ index?refer=friend
</IfModule>

"header" Call Doesn't Work Before Lenghty Operation
My config: Win XP (or 2003), Apache 2.0.54, PHP 5.1.2.

I have been trying to handle the case of a lenghty opearation on the server
while providing the user with feedback and ability to cancel, and nothing
seems to work so far.

The following code is one attempt to address this, and it is called as
result of a POST:

//*************start code***************
session_start;

// prepare exec

// flush session data
session_write_close;

// trying to display a "Please wait..." message:
header( "Location: please_wait.php" );

// long exec
exec( ... );

// finally show the result of the exec
header( "Location: exec_result.php" );
//************end code*******************

Include("....file.php") Doesn't Work (error 2039)
I have a problem with include. I am develloping a site www.mobiclips.net.
I have placed the php files dealing with the gui, getting the pictures and the
download all in seperate folders in the root. Now I want to include the header an db.php,which are in the root. I have to use something like this <?php
include("....dbconnect.php")since I grouped all php related to each other in one map which itsel is in the map called PHP.

It works fine on XP amd windows 2003, but it does not work on the webserver on
linux. Notthing shows up. A few test showed that .. go up a level doesn't work.
When I put Echo ERROR_ALL I get error 2039 ...

Include("/main.php") Won't Work On A Hosting Machine
if you are just a users among the 100s of users on a hosting machines,
then if you do a include("/main.php"); it won't include the file
but will say

Failed opening required '/main.php' (include_path='.:/usr/local/nf/
lib/php')

it seems ok to include("../main.php"); except the file will not work
if moved from www.abc.com/movies to a new location of
www.abc.com/movies/little-mermaid is there a better solution for
this?

Problem: Mail() Function "seems" 2 Work But Doesn't
ok... here is the code:

<?php

if (!$_POST[submit]) {

?>

!--- HTML CRAP HERE ---!

<?php

} else {

$mail_to = "myemailaddress@mydomain.com";

$headers = "From: $_POST[sender_name] <$_POST[sender_email]>";
$headers .= "X-Mailer: PHP 4.x";
$headers .= "Errors-To: $mail-to";

$time_sent = date("m.d.Y @ H:i:sa");

$msg = "From: $_POST[sender_name]:<$_POST[sender_email]>
";
$msg .= "--------------------------------------------------
";
$msg .= nl2br($_POST[message]);
$msg .= "

";

$msubject = "$_POST[msg_priority]_:_$_POST[subject]_SENT on ($_POST[time_sent])";

mail($mail_to,$msubject,$msg,$headers);

echo ("<div align=center><h1>Thanks, $_POST[sender_name], for emailing us, we will be in contact soon!</h1></div>");

}
?>

for some reason it "seems" to be working, but isn't actually sending mail... I have my php.ini set to my SMTP server (mail.comcast.net) and email set to my main email address... it goes through the script and I get the correct return of the echo after it "seems" to send the email... but I don't actually get the mail... I'm a little new to this, please bear with me

also if it helps... running latest stable apache (2.0.47) and php4.3.3 on WinXP. I have ZoneAlarm pro... but apache has permissions, and it does the same even if I disable ZApro.

thanks in advance for any help you can give me!

p.s. ISP is NOT blocking port 25 and since I originally asked this on phpbuilder.com forum, I have added a rule to ZAPro allowing apache all rights to port 25 specifically. I also have not getting any bounces to the error-to: $mail_to address.

Require_once Doesn't Work, "cannot Redeclare Class..."
I'm flipping my wig here, people. I'm using classes and making each class a
file. when I'm including dependet classess, I use require_once to avoid
multiple declarations - yet they happen. I put debug_print_backtrace in the
file to see how it is included, and here's the output:
#0 require_once() called at [eKirje.textGrid.class.php:4]
#1 require_once(eKirje.textGrid.class.php) called at.......

Exec("ntpdate <server>") Doesn't Work
when I try to execute the obove mentioned to synchronise the servertime by a
php-script, it doesn't work. Other shell-commands work fine. Executing
ntpdate <server> directly in the shell works also well.
So why doesn't it work?

Checked Mysql Work Back "ok" Or..
how can i make custom page to checked if Mysql is connect/work/online and if it is ok back "ON" if not back "OFF"?

Put Today's Date Into A MySQL "date" Formated Field
My MySQL table has a field that is set as type "date." I need to get
today's date, and insert it into that field. The default for that MySQL
field is 2006-00-00.

I know about the date() function. I have tried date("Y-m-d") and
date("U"), neither worked. The date field was just filed with all
zeros.

Can anybody point me in the right direction?

Getting This To Work: $_POST[$val["vname"]];
I'd like to access $_POST["variablename"] where $val["vname"] is the variable name. $_POST[$val["vname"]]; gets an error message:

Parse error: parse error, unexpected '[', expecting ',' or '' in C:Documents and SettingsShepModeDesktopWebsitesCGLD.netWebcheckform.function.php on line 8

Is there any way to do what I'm trying to do?

$Variable Won't Work In "if" Statement
The PHP code below is a snippet from an image upload script on which I am working.

If I extract the $AllowableImageHeight variable value from the MySQL database the " if" statement works - but the value of $AllowableImageHeight is "zero". However, if I assign the value to the $AllowableImageHeight variable within the script like so:

$AllowableImageHeight = "50";

the "if" statement works just fine.

As a test, I have echoed the $AllowableImageHeight variable outside of the if statment - it outputs just fine whether the variable is extracted from the MySQL database or whether the variable is assigned on the script page.

I can't figure it out. I've been wrestling with this problem since yesterday. If I extract the variable from the MySQL database it outputs in the browser but it won't work in the "if" statement. However, if I assign the value to the variable directly on the script page the variable works perfectly fine in the "if" statement!!

Why Ini_set( "short_open_tag", 1 ) Didn't Work?
ini_set( "short_open_tag", 1 );

phpinfo();

still showing 'off'

Preventing Visitors Ability To "re-visit" A Page Via The "back Button"..
I have a rather complex registration/member sign up form.. which gets a little confused, when a visitor "backs" completely out of the form, then for whatever reason returns to the form. The form contains 'cancel' buttons, which naturally cancel the reg process and redirects them to the document just before they started.

JS provides us with the "location.replace()" method, but I can't seem to find a way to coordinate the use of location.replace() with the posting of the form values. In short, I want to "replace" the first step of the form with the "second step".

I think what's making this tricky, is that each step of the form are located within the "same" page (register.php). The document works like so: The first step is the "Member Agreement" when they click "agree" (submit) the system creates a new row in the temporary register table of the db.

It then issues a registration cookie, which carries the row id, and session value. in addition (for those cookie impared users) we carry the row id and session value in hidden elements. So far, as long as the user continues through the process all is fine, but if they (for whatever reason) back all the way out, and click 'agree' again, the process fails.

I guess I have to find a way to force a reload of the 1st step "if they've gone back" OR "replace()" the first step with the second, so as to prevent the user from going "back" to the 1st step of the register page.

Errors Won't Show Up Even With Error_reporting(E_ALL) And Ini_set("display_errors","1")
Here's my code:

<?php

error_reporting(E_ALL);
ini_set("display_startup_errors","1");
ini_set("display_errors","1");

wefw
wefwef=wefwe
2349023909()
;wrgwrg ====232

phpinfo(); ?>

I get a blank page.

If I take out the crap, it prints phpinfo() just fine.

PHP 4.3.something...

Pagnation - Limit Number Of Pages Between "Previous" & "Next" Hyperlinks
Was hoping for some advice with a part of page navigation....

It works at the moment so there is a "Previous" & "Next" Hyperlink underneath the records. In between the Previous & Next links are the number of pages that there is of these records. e.g:

Previous 1234 Next

This is fine if there are only a few pages of records, but when there are hundreds of pages the numbers are listed and they take up half the web page with them.

How can i make it so only limited 10 numbers of pages say appear between the "Previous" & "Next" Hyperlink and as you progress through the pages they are as do the next 10 numbers of pages? Code:

PHP "Calender Like" Pop Up To Select Date And Store As Variable In Mysql Format?
I use to have this feature on my site about two years ago when i hired someone. It would allow the user to select between two different dates, via a small calender, save it as a variable then query the database.

Does anyone know where I can find the script for the small calender? I think it must of been populated by an external clock since all the dates were accurate etc. July 21st was on a saturday.

Setting The "Joined Date" In Phpbb_users Table?
My Saga of integrating phpbb with my own logon system is coming to an end! At the moment when I do an insert into the phpbb_users table the user's Joined Date always sets as "Joined: 01 Jan 1970" . . clearly you dont have to be a webmaster  to know thats wrong.

In the field user_regdate it seems to store the date as "1182625180" normally. However when I try and insert the date with my own insert statement, it goes in as a general date format "Tue 26th Jun,2007 04:20 pm" but still displays as..

Newline "" Does Not Work...
I am working through the exercises in the book "Learning PHP 5". I am
using OS 10.3.7, with Apache, Safari and IE. When I execute the
following code, the newline .....

[regex] Stripping Out "name" And "value" Values Out Of Tags, Aaargh
Searched through the site, but couldn't find the right regex syntax I was looking for.

the thing i want is, to extract with preg_match_all the given values in a tag...

ex.

$str = '<input type="text" name="name" value="value">'
$pattern = some magic stuff I need to know
preg_match_all($pattern, $str, $result);

And in result I want to have the values text, name and value AND it's important that the order doesn't matter
so structure of tags can be <input type =name= value=> or <input name= class= value= type=> etc, etc...

Group Mailing, Want To Suppress All The "to" Addresses In The "to:" Field
I want to do a mass emailing for a club.
I don't want all the clubs members to see all the addresses of the
other club members for privacy reasons.

How do I set up the php mail function to not display the recipients
email addresses, just to display something like, "U7 Soccer Club
Team"?

'Parse Error' Problem In "isset" And "empty"
I've been having some problems with a parse error that I can't figure
out (PHP 4.3.11 on Solaris9). Sample code:

<?php
// getting strange parse errors on this
class A {
var $value;
function A() {
$this->value = 1;
}

function getValue() {
return $this->value;
}
}

$a = new A();
if (!empty($a->getValue())) {
echo "success";
}
else {
echo "failure";
}
?>

The result of this is:

Parse error: parse error, unexpected '(', expecting ')' in
/foo/public_html/parse_errors.php on line 15

I also get the same effect with "isset", however, testing with "is_null"
or "is_int" produces the correct ("success"/"failure") result. Any ideas?

Beginner Problem - Using Date("M", $i) Where $i Is An Integer
I am trying to use the following function:

echo date("M", $i)

to echo the date that the value of a variable, $i, represents (eg. 1 =
Jan, 5 = May, 11 = Nov). Unfortunetely, it returns only Jan for any
number which I assume is the 1970 date that this function returns when
you screw up. I know that when I have the string value of &#55614;&#57157;-05-01'
in a variable, I have to convert it in the following function:

echo date("M", strtotime($strdate))

Is something similar required when I use an integer?

"unexpected Error In Date()"
Could anybody explain to me the cause of an unexpected error in date() after calling the function several times.

"unknown Date" Via Mail()
Probably something simple but all email I send via mail() is received
with an "unknown date" stamp. Am I missing something in my header?
Code as follows:

*****************************
<?php
$headers = <<<END
From: this@email.com
Date: $date
X-Mailer: PHP v$phpversion
MIME-Version: 1.0
Content-Type: multipart/related; boundary="$boundary"
END;
$date = date("D M j G:i:s T Y");
$Email = 'me@myemail.net'
$subject = 'Test Email'
$message = 'test message'
mail($Email,$subject,$message,$headers);
********************************

Echo (date("l")-1); Outputs '-1'?
What is the deal (date("l")-1) does not work, but (date("d")-1) works like a charm...I don't get it.

Best Way To Record "Date" In MySQL
which is the most convenient way to record a date (i.e. 2005-12-12) into a MySQL database and then easily manipulate it in PHP...?

".$data['date']." Formatting
When I insert ".$data['date'].", I receive the date as 2007-10-05.

How can I get this data to display as Friday, October 5, 2007 (%W, %M %e, %Y)?

Echo "<!--#include File="top.html" -->";
I have a search script which returns a page of results, however I'd like the returned page to be in the same format as the rest of my site.
To do this I've tried adding the HTML for my site to my PHP page with echo" " commands. This works for the plain HTML, but my regular pages also use SSI to do other stuff (some of them even execute other PHP scripts to generate tables of data etc). I've tried

echo "<!--#include file="top.html" -->";
but it doesn't work as I get a parse error. My question is, how do I go about doing this properly? Is this possible at all? And if not have you guys got any suggestions to get around this?

Any File Size Limit In <PARAM Name="***" Value="***"> ?
I embed an applet in my php script which has a parameter providing an
input file for the jar. Does this file has size limit?

The code is as follows:
<APPLET ARCHIVE="myapplet.jar" WIDTH=372 HEIGHT=360 VSPACE=0 HSPACE=0
ALIGN=middle>

<?php echo "<PARAM NAME="data" VALUE="myfile.">";?>

when "myfile" is beyond 15M, my applet cannot load sucessfully, but
while this file is limited like 5M or 7M, it works well.

Does anybody know is the reason caused by php script limit, applet
mechanism, or by different browser?

How To Do PHP "require()" Or TCL "source" In Bash Script
I can't figure out how to explain this any better than
this.

In PHP we have a command "require()" that obtains a file and logically
places it into another file.

I cannot figure out how to do this in bash script as the requirement
is necessary for a migration script to obtain the code from a .cfg
file and then be able for the "parent" script to run the code it
"imported" from the .cfg file, much like PHP's require() or TCL's
"source".

This is what I have so far and it fails:

if [ -f ivc.cfg ]; then
cat ivc.cfg
fi

Anyone really know bash script well please help, it's a barrier for me
not to be able to get just this one piece working.

Error In Page When Checking Http_get_vars("myvar") And "myvar" Was Not Passed In URL String
PHP, coming from ASP coding

if (HTTP_GET_VARS['b']==1){
print "Yes";
}else{
print "No";
}

when "b" is not passed via
(http://www.mydomain.com?b=1

an error occurs and the "NO" is printed but an error is printed too.

How can I check for the value of "b" so that no error occurs if b is
not passed??

example

http=www.mydomain.com

$myvar=HTTP_GET_VARS['b']

causes an error because
"b" does not exist (ie. its not passed in the URL string.

$myvar maybe evaluated as NULL or Empty but the error is printed in
the page, anyway.

From Select To Date("Y-m-d",?)
I am going nuts here.

I have 3 select forms for a birtday

<select name="bmonth">
<select name="bday">
<select name="byear">

$birthday = date("Y-m-d",(int)$_POST['byear'].'-'.(int)$_POST['bmonth'].(int)$_POST['bday']);

Date registerd is allways "1969-12-31" no matter what I select. Why?

Coding "NEXT" And "PREVOIUS" Buttons
Hi

I am stuck here. I am doing a form which dispalys details of client companies. My query includes this statement:

.... WHERE CompanyName LIKE %$name% ....

What I need is following: if a query returns more then one result I what to "flip" through result with NEXT and PREVIOUS buttons.

Mysql/php - "LIMIT" And "ORDER"
In the following fragment of code, I am querying a database that in order to display a list of films. The list is very long and I would like to offer the possbility to restrain the range of results showned by page keeping in mind that the user should be able to browse forward or backward data if applicable. I know that I have to add the LIMIT method in the MySQL query but I have a hard time figuring how not to get lost in setting it dynamically in the PHP script.

Then I have a second question. Is there a more elegant / straightforward way to deal with the display order of the data (cf. $ot, $od and $oy)? Code:

Sticking "if" Or Changes Within A MySQL "where" Array?
I'm not exactly sure how to even ask the question, and I know my terminology
is not good as I'm a SQL beginner, but, here goes.

I need to find a way to make an if statement within an array...or, the
"while" portion of a recordset.

The best way I can ask is show what I mean.
http://oscarguy.mechphisto.net/awardbrowse.php
If you go there and select an award (like Best Picture), leave the year
field alone, and select YES and submit, you'll see a lot of results. And I
have HR's dividing each entry.

What I need to do is group all the entries of the same year, or at least
only put HR's between the blocks of years.
So, I'd have all the entries for 2002, an HR, then all for 2001, an HR, etc.

Here at the bottom I'll include my PHP code I'm using so far.
But I have no idea where to even start looking for an answer...if it's even
possible.
If someone can just give me the name of the function or process or
technique, then I can go Web/book searching myself...I just need a direction
of where to go.

PHP:------------------------------------------------------------------------
------
$query_RS_award = "SELECT * FROM $award WHERE id != &#391;' ORDER BY year DESC,
w DESC";
//$query_RS_award = "SELECT * FROM $award WHERE year =
"$year"";
$RS_award = @mysql_query($query_RS_award, $connection) or
die("Couldn't query: " . mysql_error());
$totalRows_RS1 = mysql_num_rows($RS_award);
while ($row_RS_award = mysql_fetch_assoc($RS_award)) {
$award_id = $row_RS_award['id'];
$award_tblid = $row_RS_award['tblid'];
$award_award = $row_RS_award['award'];
$award_year = $row_RS_award['year'];
$award_category = $row_RS_award['category'];
$award_won = $row_RS_award['w'];
$award_film = $row_RS_award['film'];
$award_nominee = $row_RS_award['nominee'];
$award_note = $row_RS_award['note'];
if (!($award_category)) {
$award_category = "n/a";
} else {
$award_category = $award_category;
}
if ($award_won == "1") {
$award_won = " - Award Winner";
} else {
$award_won = "";
}
$display_block_Award .= "YEAR:&nbsp;<span
class='normalText12White'>$award_year</span><br>FILM:&nbsp;<span
class='normalText12White'>$award_film</span><br>CATEGORY:&nbsp;<span
class='normalText12White'>$award_category</span><br>NOMINEE:&nbsp;<span
class='normalText12White'>$award_nominee</span><span
class='normalText12BoldWhite'>$award_won</span><br><blockquote><span
class='normalText12White'>$award_note</span></blockquote><hr>";
}

Cookies And "include" Or "require"
i'm having a problem with my setcookie() instructions. Although there are absolutely
no html tags in front of them,for some reason PHP3 sends me back the message "oops...php3_SetCookie called after header has been sent"...

I do however use two "require" calls, one to a file with a .php extension, and one to a file with an .inc extension. At the beginning of each files there's a Could the cookie failure and the include functions be related ?

In my text, I have even wiped out any HTML tags such as "bold, paragraph, line break" tags, even in "echo" commands, but to no avail what am i doing wrong ?

FTP_login + $pass="" And $user=""
I use the following scrit in an Intranet with the user name = "" and
the password = "" :

<?php
$ftp_server = "192.168.25.25";
$ftp_user = "";
$ftp_pass = "";

$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to
$ftp_server");

if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) {
echo "Connected at $ftp_user@$ftp_server
";
} else {
echo "Can't connect with $ftp_user
";
}
?>

I have the following message :

Connected to 192.168.25.25
Warning: ftp_login(): 'USER': Invalid number of parameters in
E:www est_ftp.php on line 26

I tried to : ftp_login($conn_id, "", "") but i have the same result...

Alphabetize Results Ignoring "and" And "the"
is there a good way to alphabetize results and ignore articles like "the", "and", "a", and "an" so that it will alphabetize by the next word? just wondering...

Why Use "Stripslashes" And "Addslashes" Function
Can someone let me know why one would use strip slashes or add slashes functions. I know what they do but cannot see the exact use for them e.g. if i have a textfield and encase it in an stripslashes function, it will escape any back slashes etc...

Parse Errors With "case "action":
I want to call an action that is in a file called "configm.php" but I get a parse error on line 8. (the bit that goes 'case "add":') Code:

How To Count "Hit" And "View"
I would like to know when a user logs in, he clicks Mike's E-mail. It will count one which mean "Hit". So that I will be able to know how many times users click Mike's E-mail.

Like Sitepoint. When other users read other problems. Views will count 1. I would like to know how to do it. Could you explain with script?

"echo" Or "print" ?
Can tell me someone is some big different between "echo" and "print". What You prefer to use?

Convert Date() Month Numeric Into Month Full Name.
date("m"); returns the following result for this month... "02"

That is fine and dandy, but the problem is, I need to change 02 into February, and not by changing it to date("F"); I need to use the date function to convert the supplied number of 02 into February, is there a way of going about this logically without a bunch of if/else statements??


Copyright © 2005-08 www.BigResource.com, All rights reserved