Formatting numbers to show commas and decimal points.
I'm already using number_format() it shows the commas but for a number like 1500.53 the 1500 becomes 1,500 but the .53 disappears. Is there a better way?
View ArticleSome odd problems with switch case
Ok so i have a few rather odd problems with switch case. I have no clue why these things are happening: PAR IS: <?php $par = isset($_GET['par'])?$_GET['par'] : ''; switch ($par) { case $par >=0...
View ArticleFile uploads but doesn't attach to the sent email
Hi! I'm hoping someone can help me out with a HTML form using PHP. The form allows users to upload a file (and that part works) but it's supposed to attach that file in the email it sends with the form...
View Articlemethodological Questions for user levels
Hi All. I have a methodological question (not How to code it) I have an internal application. The application allows users to record Hours and Jobs I want to allow certain users to view basic...
View ArticleTrouble printing table data with foreach loop
I'm struggling to print table data. I have a simple address book in mysql and want to loop through each item and print. I've read everything I can get my hands on and nothing is showing. Any...
View ArticleDifferent php include by date
I want to have a different include on a page according to the user's choice and if there is no choice, the date. The part with cookies to change the inclided php works, but the page is totally ignoring...
View Articleredirect if id is empty
I have a question I have page like so: index.php?id=100 but let's say that id=101 is blank Is there a way to redirect the user if that page is empty. Redirect them to homepage. Is this possible...
View Articlehelp arrays!
please answer this question in php.. I need three arrays,One with shops, second with other instruments, and the third with the links between them. For example: $instruments =...
View ArticleHow to use the property exists on sub classes?
Hey, I am trying to creating a database object that does all my database findings, and use it as a sub class for all my other classes that will be needing to use it. I have created a sub_class...
View Articlemysqli_connect
if I have two client applications calling myqli_query at the same instant in time will they both be honored by the mysql database or will a collision and error condition occur on one of the db...
View ArticleRedirect if record already exists in database
I have the following snippet of code that I *think* is right, but being new to PHP I just wanted if someone could let me know if this is indeed correct. I'm simply redirecting the user if they are...
View Articleageing report in php
hi. I need to generate the ageing report like Code Name 30days 60days 90days 120days 0001 abc 500.85 675.90 100.78 56.90 0002 def 123.00 0.00 21.00...
View Articlecookie stopped working
I've been using this script since a few months and it was working perfectly until i switched host (and php version)Basically the script is used to put the page ID inside an array in a cookie, each time...
View ArticleAdd font in PHPmailer
Hello How can I add a specific font and fontsize to my mail body ? require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // Laat PHPMailer gebruik maken van een smtp...
View ArticleAnother Login twister !
Hi guys, I am back with another login twister. Earlier i tried to create a yahoo like login system which ensured that a given user was logged in only on one machine even if that user tried to do a...
View Articlewebsite on wamp
Hi I am building a website on wamp that I can play around with and have got some errors They are SCREAM: Error suppression ignored for ( ! ) Notice: Undefined index: qs in C:\wamp\www\admin...
View ArticleForm Validation & Security?
Hey all, I'm trying a little project to help improve my php and mysql knowledge. I'm struggling with email validation and security. I'm looking to check if an email is valid or not before I add the...
View ArticleOne submit button for multiple pieces of data
Here is my code: $result = mysql_query ("SELECT * FROM $tbl_name WHERE username='$user'"); while($row = mysql_fetch_array($result)) { $username = $row['username']; $email = $row['password']; $age =...
View Articlehow to put the result into database
hello.sorry im quite noob in js, the calculation result is including js,so i do not know how to put the calculation result into database,can someone help me,here is the coding <!DOCTYPE html PUBLIC...
View ArticleMySQL in PHP - No syntax errors, but not working :-(
The following code is connecting.. and just the sql part works until i add the variables and radio button input parts... please help! <?php $link = mysql_connect("localhost", "emorette11",...
View Article