|
I want to get only numeric from a variable. Example:- $a=1452kk;
$b=kj4554;
I want only numeric value like 1452 and 4554
I can do this with parseFloat and trim in java script but how can get only numeric value in php ?
|
|
|
|
|
|
A few days ago I noticed that, when updates are available, the usual icon in the system tray doesn't appear.
Everything else works perfectly, whether I update through system settings, or through the console... I just don't get a notification when an update is available.
Any idea why?
Got it. I was missing some python bindings.
Where it seems there are only borderlines, Where others turn and sigh, You shall rise!
modified on Wednesday, September 2, 2009 2:32 PM
|
|
|
|
|
hi experts i want to build an server
intrested plz help me with the php source code
plz help me through as i don't know php
|
|
|
|
|
|
This is a very late reply. Let somebody like me get benefit. (i searched a lot and could not even get a tail for these).
You want to setup a server by using PHP?
If i were to do so then i will choose C/C++ 32bit to do so.
You need to know about sockets. The simple concept of client and server. and some basic idea of an existing client server protocol. better if HTTP.
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Hello, I have installed Mono 2.4.2.3 version on Linux Redhat OS.
I m facing the error "This is a marker file generated by the precompilation tool, and should not be deleted!"
Earlier I had 2.4.2.1 version in which it was working fine. For some other bug fix, i had installed the latest version.
Any thoughts on this? Pl. revert
Thanks..
|
|
|
|
|
Hi Friends
I am new to this forum and a beginner in the world of website desinging..
I need help from you guys.
1. I want to create a Online form where people can come login with their username and passwords and
submit the data by using a form there.
2. Then i need this data should come to a database (includes my hosting plan).
3. Now i want to create different login ids as per my requirement to give acess to this database online where people can come and check date wise.
I know i am asking too much help, but plz help me out with this, i appericiate and thanks in advance.
Sean
|
|
|
|
|
Two month ago i was made a project by php where i made joint in ,login and logout page.
I think u need these .I send u the php source code.
1.Joint in page-..........................
< ? php
require_once ('phplib/populator.php');
initdb();
session_start();
if( isset($_POST[email]) ){
$Q="INSERT INTO `studentdetails` ( `name` , `reg` , `email` , `add` , `phone` , `pass` ) VALUES ('{$_POST[name]}', '{$_POST[reg]}', '{$_POST[email]}', '{$_POST[add]}', '{$_POST[phone]}', '{$_POST[pass]}')";
$R=mysql_query($Q) or die("Can't execute That entry. ".mysql_error());
//$_SESSION['login']=true; /this off becauce of auto login kabir
}
$sid=$_POST[reg];
?>
< ?php
//echo "<p>If you are a member already click <a href='home.php?sid=$sid'>here</a> to access the lab management software.</p>";
if(isset($_POST[email])) die("Your account has created");
?>
2.Log in -.........................
< ? php
require_once ('phplib/populator.php');
initdb();
session_start();
?>
3.Log out-...........................
< ? php
session_start();
$_SESSION['login']=false;
session_destroy();
?>
...............populator.php ......................
< ? php
function teststr(){
return "hello this is a line";
}
function initdb(){
$link = mysql_connect("localhost", "root", "") or die("Could not connect : ".mysql_error());
mysql_select_db("lab") or die("Database Missing");
}
?>
|
|
|
|
|
Hi,
Just a note, that you should edit your post and put your code in PRE tags, because it will make your code more readable as it can preserve formatting and uses a mono-space font therefore it will make your post more useful.
function example($e)
{
echo $e;
}
Can you see how much nicer that is to read?
ps. PRE tags also support some syntax highlighting.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
How to refresh iframe in php ?
I have 4 iframe in my php and want to refresh all.Example:-
<div id="l1" style="position:absolute;left:50px;top:120px;width:450px;height:140px;z-index:35" align="left"><iframe frameborder=0 src="http://ck.com/ker.php?scrip=echo $us" width=412 height=160</frame>/div>
|
|
|
|
|
I'm very confused. Do you want to refresh the iframe 's during run-time i.e. after the page has loaded? Because I do not see how you can do that with PHP, it would have to be Javascript.
The only possible time you can use PHP is before the page has loaded, in which case it would be pointless as the iframe would be loaded anyway. Everything after the page load has to be done with Javascript.
Here is how to refresh the iframe in Javascript:
document.getElementById('iframe1').contentWindow.location.reload(true);
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Thanks for your help.I want to refresh iframe after loading page and after every 1 minute.If it is not possible in php then can you tell how to insert java script function in php for refreshing iframe.If you can try to give me a very short example.
Thank You
|
|
|
|
|
udch wrote: If it is not possible in php then can you tell how to insert java script function in php for refreshing iframe.
Your statement shows a clear lack of understanding about how HTML, PHP and Javascript work.
In the below example you can see how to use PHP with HTML correctly. You can see that the HTML tags are not written in PHP. The only part of this page that is affected by PHP is the body which will have 'Hello World!!' written in it.
Also see how the Javascript is in the <script></script> tags. Make sure you give the type of the script block which in this case will be text/javascript .
Your Javascript functions will now go in the script tags, as shown. Notice that in the function refreshIframes() there is a setTimeout() function which calls the function given as the first parameter ('refreshIframes()' in this case) and the number of milliseconds to wait for it to call as the second parameter (60000 in this case [60 seconds]).
Please also note that onload="refreshIframes()" is in the body tag, this calls the refreshIframes() function once the page has loaded.
<html>
<head>
<title>Hello World</title>
<script type="text/javascript">
function refreshIframes()
{
setTimeout('refreshIframes()', 60000);
}
</script>
</head>
<body onload="refreshIframes()">
<?
echo 'Hello world!!';
?>
<!-- INSERT IFRAME HERE! -->
</body>
</html>
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Can php refresh function after loading a page ?
|
|
|
|
|
No.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Thanks for you help brother
|
|
|
|
|
|
|
I am trying like this but it is not working can any one tell me how to do this ?
<?php
for($i=0;;$i++)
{
$us=500425
ch();
sleep(15);
$us=500547;
}
function ch()
{
<div id="bv_Html1" style="position:absolute;left:50px;top:120px;width:450px;height:140px;z-index:35" align="left">
<iframe frameborder=0 src="http://abc.com/ker.php?scrip=echo $us" width=412 height=160></frame></div>
}
?>
|
|
|
|
|
|
I want to call function ch() after every 15 second until web page is open. How can i do this ? I tried it but not succeed it.
|
|
|
|
|
udch wrote: for($i=0;;$i++)
you need to fix this line ie:
for($i=0;$i<10;$i++)
|
|
|
|
|
Thanks for your help brother.Is this code is ok because i am getting this error massage
"parse error (unexpected token `id') -- (id . ch)"
<?php
for($i=0;$i<1000;$i++)
{
$us=500425
ch($us);
sleep(15);
$us=500547;
ch($us);
}
function ch($us)
{
echo $us;
}
?>
|
|
|
|
|