Hi all, nevermind this.. problem solve, instead of this, i multiple each values with 1000.. coz these values are units in kilograms.. then i converted it into grams.. coz they said 1-1 in float will result to some bug.
thanks
User Profile
Collapse
-
php float problem, 1-1 = 2.22044604925E-16
Good day to all,
Recently I have encountered a problem regarding to float numbers. I have this query that gets the values from database and insert it to an array. These values are decimal (float) numbers. Then basing on these values I have a given value inputted from a textfield, and this given value decrements(subt ract with the values from array) until its last remainder. Here's how it looks like:
Code://assume that
-
hi there,
can you share us the script so that we can figure out what's wrong.
bonski...Leave a comment:
-
ok... i checked your script... for me.. i think you sql statement is having some errors or cant successfully insert the data.. because you lack some single quotes in your $_POST[]...
i think this one
[PHP]mysql_query ("insert into pix13(name,emai l,city,state,zi p,country,month ,date ,upload) values ('\"". $_POST[name] . "\",\"".$_P OST[email]. "\",\"".$_P OST[city]. "\",\"".$_P OST[state]....Leave a comment:
-
what exactly you want to do? upload image file and display it on a webpage?...Leave a comment:
-
oh... ok... thanks RedSon... so i'm going to burn it now... hahaha.. i'll be back for more questions... about linux.. hahaha.. maybe..
thanks again..
bonski...Leave a comment:
-
yeah.. good to be back... hello everybody... uhmmm so.... speaking of ISO and burning some stuff.. i downloaded FEDORA 7 ISO file... and there's another ISO file included on the download... the rescuecd... so should i burn it together with the i386-DVD or burn it in a separate CD-R? hahaha.. sorry for the question guys..... new to linux... thanks in advance...
bonskiLeave a comment:
-
is it possible to stream police radio on web(particularly on the webpage)?
hello guys...
my friend is currently updating a website for firefighting departement... and is it possible to stream police radio on web(particularl y on the webpage)?
he's using PHP.. are there any PHP functions to made that possible.. or any methods at all...
thank you so much..
bonski -
not sure but this but give it a try... ^___^
[PHP]$fetched=mysql_ query("SELECT districtname FROM location,distri ct
WHERE (location.lat BETWEEN district.startl at AND district.endlat ) AND (location.lng BETWEEN district.startl ng AND district.endlng )");[/PHP]...Leave a comment:
-
ok.... roger.. you can still put this script inside the "MyPHPFunctions .php"
[PHP]$scriptname=get env("SCRIPT_NAM E");
$viewpage = basename($scrip tname);
echo $viewpage.'<br> ';[/PHP]
just give a try... bonski...Leave a comment:
-
ei roger...
[PHP]$scriptname=get env("SCRIPT_NAM E");
echo $scriptname;[/PHP]
bonski ^___^...Leave a comment:
-
sorry chaos... i didn't see the line "press the submit button"... hahaha.. my bad.. my bad...
ok.. here it is..
[HTML]<html>
<head>
<script language="javas cript" type="text/javascript">
function checkForm(){
var status = document.getEle mentById("statu s").value;
alert(status);
}
</script>
</head>...Leave a comment:
-
ei bettor,
in mysql database.. you can make queries that will insert, edit, delete, search data.. you can add the data directly to database using mysql commands.. or you can use phpmyadmin... or you can make your own front end using PHP.. by having html forms where you input your data and a php scripts to process them the way you want... after adding you data to the database.. on you frontend.. you can make a script that will query...Leave a comment:
-
hello chaos..
try this.. ^_____^
[HTML]<html>
<head>
<script language="javas cript" type="text/javascript">
function showStatus(stat us){
alert(status);
}
</script>
</head>
<body>
<form name="form_name " action="#" method="post">
<select name="status"...Leave a comment:
-
ei pbmods,
ok.. thanks for the info... gotta try that now... hahaha..
^___^ bonski.....Leave a comment:
-
-
-
hahaha... nevermind guys... i already found a solution.. using.. [PHP]chr(10)[/PHP] instead of '\n'.Leave a comment:
-
modifying a text file
i've been trying to modify some lines from a text file... and i had this text file and a php script to modify it...
//code.txt
Code:101:2001 102:2002 103:2003 104:2004
[PHP]<?php
$code_file = 'code.txt';
$code_file_line s = file($code_file );
if(isset($_GET['address']) && isset($_GET['code'])){
$address = $_GET['address'];... -
put this line after line 34 and after line 41 with this lines of code...
[PHP]
if($delete_cat_ qry){
echo "<br><br><p align='center'> <span style='color:re d'><b>The Album has been Deleted!<br><br >";
}
[/PHP]
bonski...Leave a comment:
No activity results to display
Show More
Leave a comment: