I have some ph I have posted below and would like to add the stripslash function to it but dont know where to start
function writer($value)
{
$fp = fopen ($this->filename,"w");
fwrite($fp,$value);
fclose($fp);
}
As ususal all help much appreciated
Rob
Works like dream.. thanks one last questio I have tried adding it into this and it just disables it..
<script>document.write( (($data[15]*100) / (2.54)) / 100 );</script> Again would like no more than 2 decimal places
$data[15] is a cariable replaced by the database
Cheers
Rob
Hi Anyone (Dave)
have one last question, the script above works like a dream however some numbers have 6 decimal places after them, how would I limit this to 2 decimal places?
I have tried with some spipets I have seen to do this but it disables the funcyions so I am sure they are not going in...
Hi Dave
Works superb, when I see a script like this I can see how it works, I am just not advanced enough yet to actually write one on my own.
every time I post in this forum I get great help.
Cheers
Rob
...document.forms[2]. etc?
cLFlaVA
Can I just change the value of getFal() to getVal(1) etc?
<script language="JavaScript">
<!--
function getVal() {
return (500 / 100) * 17 + 500;
}
//-->
</script>
<body onload="document.forms[0].Price.value=getVal();">
Thanks in advance
Rob
Hi Dan
Thanks, I used the value 500 as an example to show a figure sorry.
I should have said this will be a dynamic page and 500 will be replaced by a value from a database.
Hnce the need for some javascript to give some alternative price options.
Cheers
Rob
...would think onload is the best way to make this happen?
I have tried the following.
<BODY onLoad="document.forms[0].Price.value=( ((500) / (100)) * 17 + 500 );">
<input type="radio" value="" checked name="Price">
But it gives an error.
The idea is that when the page loads the radio buton...
Hi
Thanks for the replies to my last post, I have another small script problem. I am using the script below to add 2 numbers
<script>document.write(24.99+2.99);</script>
when I add some numbers such as the ones in the example I get about 12 numbers after the decimal point, how can I force...
Hi
I have a small javascript that adds 2 form fields, however when I add decimal numbers it only adds the integers rather than the whole decimal number. Any suggestions greatly welcomed.
Script is below.
Cheers
Rob
<script language="JAVASCRIPT">
<!--
function addTWD() {...
Hi,
Im pretty new to PHP, however I have a form that submits data to a mysql database, I would like to specify the minimum amount of characters that have entered into one field before the form can be submited, If any one can show me in simple terms I would be very grateful.
Cheers
Rob
Hi I am using a small cgi program to open a flat data file then go through the results and display only results that are between two values in a field.
I have pasted the part of the script that I am using to do this below:
The field I am trying to use tha value of is $price, my problem is that...
Back quicker than I expected..:)
I know in regular perl how to do an "else if statement", however this type of perl is new to me.
Some of my listings do not have an artist so in the results from this program I get a table at the top with these listed. These are special offers and I...
That fixed.. Thanks to one and all and a very big thank you to Charles & justice
When my knowledge is sufficient I will be back to share it in the mean time I will probably be back picking everyones brains..
Cheers Rob
Thanks Charles
Added the extra line calling CGI PM and still getting the same error.
I do have telnet access but my knowledege is very limited and do not know how to run from the command line.
Any suggestions welcomed..:)
Thanks Rob
You didn't make me feel Dumb,:-) I never read your initial post properly.
I did some research today and worked out that the subroutines can go at the end and below is my latest try..
I am still getting the following error:
Execution of ./allnew.cgi aborted due to compilation errors...
Charles,
Now I do feel Dumb.. sorry I dont know where to put the subroutines!!
When I used strict it gave me the compilation error.. without strict it gave me the blank page.. and I dont know how to run from the command line..
Maybe I should change from a techical user..:)
Cheers Rob
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.