Check If Number Is A Mulitple Of 3
I'm sure this is very easy, my brain is useless at arithmetic I just need to find if a number is a multiple of 3. Just trying to add a by 2 get one free deal so if they've got 3 or 6 etc then i give one free.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Check If Number Is In An Array
how can i check if a specified number is in an array e.g number =5 searching in array (1,2,3,4,5) I know how to do it for a mysql query, but I need to do it in PHP, anyone kno how i could do this. Also say I have several numbers I want to check are in the array, how would I do this.
Check Number Off Emails On Server?
in my admin, I want to make an overview of details about my CMS. On of the details is the number of new emails on my server. Can I do this with PHP?
Generate A Random Number & Check DB To See It Is Unique
I have a registration form that once submitted inserts the values into a mysql db. Its a registration form for a trade account (eCommerce site) - basically once a company applies for a trade account, i'd like an Account Number to be generated automatically however obviously this needs to be unique. So ideally i'd would like it to randomly generate an 8 digit number and then check the database to ensure it isn't already in use.
Mulitple Variables
how do I assign an if statement to multiple varibles? Like if I want it so that if a member tries to login without giving a name or password i want it to display a error but how do i do it is it like: if ($passwd || $usernm == NULL){ $error = 'You Did Not Enter A username Or Password';}
Mulitple Database Entry
If I want to enter some info into 2 database's with some fields being the same eg name and pass and the key 'uid' to be the same i got this code and it give me a error, PHP Code:
Mulitple Record Form Edit
I'm working on a form to be able to edit multiple records at the same time but only the first record is showing the correct details. Code:
Returning Mulitple Variables From A Function
Not sure if this matters but my function is actually part of a class. I am just trying to return 2 variables, from what I have read I need to store these variables in an array, but I can't seem to get the data out. Code:
Check Week Number In End Of Year And Begiining Of New Year?
I am creating a little own calendar. Now I want to add a "previous week" and "next week" functionality to the calendar. It is easy to take $thisWeek - 1; and $thisWeek + 1;, but there has to be a check wether it is the last week of the year and it should actually be a new year and head to week number 1. HOW do I make this kind of function? I use the following string names: $thisYear $thisWeek
Replace Hex Number Or Decimal Number In A String ?
String may contain alphanumeric values. What is the bestway to replace a hex number such as 0x122aaa and decimal number such as 5678 with a string "blah" Example: I want to replace below-- wr_thru1 data or mask mismatch!! for addr=0x00000b73a0540 & mdfid:11 with wr_thru1 data or mask mismatch!! for addr=hexVal & mdfid:decVal
Order Number Or Tracking Number
I need to create some kind of random number within a persons session that can be inserted into a customer id column for their orders, customer, and credit card tables. Unless their is a better way to link a customers information together between a few tables besides using auto increment. Things could get screwed up for me if I use auto increment, especially if someone submits their information but does not actually place an order. My question is " How can I create a random order number that can be used within a persons session and will stay the same throughout the whole program for that one person? "
Database Stores Default Number Everytime, But I Havent Set A Default Number??
Im having some problems with my database. Everytime i store a number which is longer than 10 numbers the script or database puts this number into the database: 2147483647. Its does this everytime no mather how i write the numbers and nomather how long the number is, it just needs to be over 10. I have set any default value in the database and to be sure i havent i tried deleting the table, but same thing happends again???
Check Box?
i am trying to create few check box in one page without a submit button, and there are 5 have which is some with this. User only able to click submit in the last page after he make a selection after these 5 page. How can it keep the selected check box so that i can process in last page. I had heard there are one way to create a onclick function inside check box but how?
How To Check An URL ..?
I am a beginner in PHP. Does anybody know how to check if an URL is alive or dead in PHP (not exist or server down...or whatever ) ?
CHECK URL
How it can be checked that a URL exists or not in PHP.There is one way is to use fopen function then passing the URL as a parameter. Like this, <? $URL = "http://www.abc.com"; $fp = @fopen ($URL, "r"); if (!$fp) { die ("Cannot open website $URL!"); } ?> But I think that there should have some other smart technique.
Can I Check SSL Somehow With PHP?
Ever since I got a server for our site, it just opens new issues. Here is the problem: My SSL Cert somehow got corrupted. The server is managed, so they fixed it right away once I noticed it, but nobody was able to checkout until it was fixed, and I cannot check the site every hour. Here is what I want to do (but the server people say it is not possible): Is there a way, by chron or otherwise, to run a PHP that requests a secure page, and if it does not respond, it emails a warning? It seems that this should be able to be done without too much trouble. Any ideas?
How To Check Id
I was wondering how to get the id that has the biggest number and then add 1 to it so I can have an id field id name 1 test 2 test1
Eregi For URL Check
Can someone hook it up with an eregi expression to check URLs for validity?
Check For Folder
how would i check if there's at least one folder in the current folder? the current folder is $dir/$f/ this is what i have, but i know its wrong $fillle = "$dir/$f/"; if (file_exists($fillle)) {$Q="true";} else{$Q="false";}
How To Check If I've Been CHMODED 220 ?
My host and I have come to a dissagreament on filedownload sizes, and everyday when I wake up, I see that I'm back to 220 for that /files/ directory. I'd like to point out that it's nothing illegal, it's just gamepatches, and yes... these can get quite big. Now, untill I settle that, I need to redirect my visitors IF that site is innaccessible to another box... how can i detect if the user gets a 403 page so that I can redirect him? Had a look at "socket_read()" etc... but can't make heads or tail in it yet, will keep looking in there, but if someone can give me a push in the right direction, I'd apreciate it.
How To Check For Multiple @'s
We are trying to prevent spammers from mass mailing their list while using our contact us script. We have a few security measures in place but would also like to add a "check for more than 1 @'s in the to:, cc: and bcc: fields. Can anyone point us to some code or turotials for doing this?
Check A String
Hey everyone, how would I check a string for having only numbers and having 4 integers exactly?
How To Check If 2 Vars Is Not Set?
How to check if 2 vars is not set? I started with this if (!isset($x,$y)){ and tried many like below but gave up. if (!isset($x)) || (!isset($y){ if ((!isset($x)) || ((!isset($y)){
Check Data Not Already In D/b
Hwo can you do it, on an insert query so that it will check whether there is a record with the same info, say club name for example, and then if u try input same thing again it will reject it.
How To Check If Theres Something In STDIN
How do i check if there is something new in STDIN? I ran into this problem when i was doing some simple command line script that takes input from STDIN. And i noticed that feof() always returns TRUE with STDIN. Also it seems that if i fread(STDIN) and there is nothing in STDIN, it waits forever for input. So i was wondering if there is some way to check how much stuff there is in STDIN and then read it, because i dont want to wait for the input forever.
How To Check SessionID Available Or Not?
I am working on a site in which I need to check whether user is online or not. If user successfully logged out then I can change status from online to offline but if user do not logged out and close the browser or session timeout then in both of the case I do not handle how to change user's status from online to offline.
Check Box Question
I have a small question regarding check box and mail() forms. I have a mail() form on my website and I want to add to it a check box that if checked the user get a copy of the data he sent and if not check the mail is sent to me only please help me doing this because I have tried how to figure it out but I couldnt and the problem is that am not a really good php developer am just a beginer.
Spell Check
I have a form with 6 different fields for the user to fill in. One of the field is the text field and they are suppose to fill in about 6 lines of information. This page/information is dynamically get displayed on my webpage. How do I make sure that before it gets displayed on the web some kind of spell check is done automatically. I did try at php.net. There is a function call Aspell() but I don't know how to get that to work for my problem.
Domain Name Check
I want to check domainnames on my website. Type in a name and you'll see if it exists or not. I've once had a CGI Script dat does this... but I wonder if its also possible in PHP.. and how?
Webmail Check
How would I go about writing a script that checks users GMAIL and HOTMAIL emails and displays it for them? if you go to www.netvibes.com it allows you to check your gmail or hotmail and yahoo accounts right from their website.
Check Image Is Not There
is there an easy way to do a check on a directory to check that a file uploaded using php uplaod fucntion isn't already there, and if so where can i read up on this.
Spell Check
How can I do spell check words? I have a file with a bunch of words in it, I want to eliminate incorrectly spelled words.
String Check
I want to check if a string contains only alphabetical and/or numerical characters. I think the solution is eregi, but i am not an expert on regular expressions..
How To Check Value Of Variable??
I have this input box that is optional called "Reason" If a user submits this form with data in the "Reason" form then I want to take those contents and add to them, ie: if (isset($reason)) { $reason_message = "Reason for rejection: $reason";} else { $reason_message = "";} Then I have $reason_message sent alow with other stuff in an email. The problem is that if a user leaves "Reason" empty, when they get their email, this string called "Reason for rejection:" is sent. Bottom line: is there a way for me to tell that "Reason" has no value and there for not send "Reason for rejection:"
Check Boxes
I have a very little problem with check boxes. How can I write a simple PHP code to tell me when a check box has been checked, and then use the name of the checkbox in a function.
Update Check!
i update a table like this and i want to check if the update was ok or not! Code:
Check For Cookies
This is more of a pain than I thought it would be. I need a simple code segment to determine whether a browser accepts cookies or not. When I pass variables between pages when cookies are turned off, the global variables are empty between pages, fine, that tells me cookies store the global variables - right? I store the values in $_session and when cookies are turned on values are passed between web pages - I can see these values in fields that are displayed in the next web page. I need to be able to check on the 'first' entry webpage after a user enters that page directly whether or not their browser accepts cookies at that point. Everything I have tried complex to simiple won't work. How do I do this?
Check My Math!
Not sure about you, but when I run this, it tells me 59001.31 doesn't equal 59001.31. Change each side of the equation by a hundreth or two and it checks. Change it a bit more, and it won't. _What_ is going on here?! <?php $subtotal=59001.31; $principal=58605.33; $interest=395.98; $check=$principal+$interest; echo("<pre>"); echo("Check: " . $check . " "); echo("Subtotal: " . $subtotal . " "); if($check!=$subtotal) { echo("Check (" . $check . ") does not equal subtotal (" . $subtotal . ")"); // Check doesn't equal subtotal } else { echo("Check (" . $check . ") equals subtotal (" . $subtotal . ")"); // Check does equal subtotal } echo("</pre>"); ?>
Check If The Page Is Not 404
How can I check if some url or address works ? If I had in my database about 1000 links, how can I check if they work ?
Check Fonts
Is there a way to check wich fonts are installed on sombodies browser? if not in php maby in java or something. I need the code for that for a highly customizable graffity wall.
Cookie Check
I would like to check and see if my visitor’s browser accepts cookies, and do it on the first page they landed on. To best of my knowledge ‘setcookie’ function does not give a confirmation back if the cookie was already set. Is this possible and if so how? Some notes:
How Do I Check Against The PHP Version?
I'm writing an installation script for my PHP content management system. I've written the code to be compatible with PHP 4.06 or later. I need to get the PHP version and throw an error message if the version is less than 4.0.6. I realize that phpinfo outputs the info, but what function would get me the version string?
Using PHP To Check POP Email?
PHP document that would log-in to the users POP mail server, and check for mail, allow them to "compose" and send an email through that server, along with any attachements, etc. I've seen this done with Cold Fusion, and am looking for information on this using PHP.
Check Click
I have a page and a sponsor. Every time a user click on a banner from our sponsor their webpage is opened. I'd like to reward these users, but how to check who clicked on a banner. I can't do anything on sponsor's webpage?
Check Wildcard URL
I'm looking for a function that will help me determine whether or not a URL entered by a user matches specific requirements. This is done using $_POST. Basically the format of the URL must be either: www.example.com, *.example.com, www.example.*, or *.example.* - or some kind of combination such as www.url.com*. I don't want to allow a star in the 'url'. So in theory, to check this, all i would have to do is make sure the string contains: [www and/or *].[text].[text and/or *]
Postcode Check
I have no idea where to start with the code, but would like in a way that i could input true and false values, eg if it contained "sw19" or "SW19" value = true. If postcode is something not listed, value = false also True and False results will take the person to a relevent page, or relevent pop up a box.
|