Quantcast
Channel: PHP Freaks: PHP Help
Browsing all 13200 articles
Browse latest View live

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 Article


Some 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 Article


Image may be NSFW.
Clik here to view.

File 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 Article

methodological 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 Article

Trouble 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 Article


Different 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 Article

redirect 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 Article

Image may be NSFW.
Clik here to view.

help 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 Article


How 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 Article


mysqli_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 Article

Redirect 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 Article

ageing 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 Article

cookie 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 Article


Add 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 Article

Image may be NSFW.
Clik here to view.

Another 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 Article


website 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 Article

Form 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 Article


One 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 Article

how 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 Article

MySQL 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
Browsing all 13200 articles
Browse latest View live