-
Posts
229 -
Joined
-
Last visited
Posts posted by dzelenika
-
-
you omitted a brace at the end
mysql_query("DELETE FROM `users` WHERE `id`= ".(int)($_SESSION['user_id']) ) ;
-
i think it is better to use
if(!isset(...
instead
if(empty(...
-
if (isset($_POST['escape']) || (isset($_POST['suicide']))) { if(empty($_POST['agree'])){ echo "You need to check the box"; }else{ mysql_query("DELETE FROM `users` WHERE `id`= ".(int)($_SESSION['user_id']); } }
-
you cannot have two else blocks
-
I think that you omitted to call function getParents
-
try folowing:
$ip = $row['idvisit'] ;
echo ord(substr($ip, 0, 1)) . "." . ord(substr($ip, 1, 1)) . "." . ord(substr($ip, 2, 1)) . . ord(substr($ip, 3, 1)) ;
-
I think there's an error happening on server.
Open error log to see which error.
-
opposite means negation !
if(!($checkBowler['playerID'] == ($match['currentBowler'] or $match['waitingBowler'] or $match[$bowlingTeam.'WicketKeeper']))) { #Check the current, or next, bowler or the wicket keeper
-
i believe, Your varbinary data consists of 4 bytes. Each byte has ASCII code equal to adequate part of IP address
-
I don't understand why are You storing IP address in bnary instead in varchar?
-
I think you are updating wrong php.ini file.
Use phpinfo() to see what php.ini file is loadaed.
-
OK
The way You doing this is completely wrong.
You do not have to use XML parser to read XML document.
Use simpleXML instead.
Example:
$xml = simplexml_load_file('test.xml'); foreach ($xml->story as $story) { echo $story->headline, '<br />'; echo $story->link, '<br />'; }
-
I like using onClick events to activate changes on containers like <td> <div> however I notice that the cursor is a prompt (the I). Is there a quick way to get it to be a anchor tag cursor or no change?
Use css property cursor
-
this configuration works on my PHP installation:
zend_extension="d:/razvoj/phpProd/ext/php_xdebug.dll"
xdebug.remote_mode="req"
xdebug.remote_enable=On
xdebug.remote_host="127.0.0.1"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.show_local_vars=1
-
Try with urlencode() or rawurlencode()
-
use simplexml, it is easy:
$xml = new SimpleXMLElement(file_get_contents(("http://www.bluesq.com/bluesq_php/cubs/cubs.php?action=getpage&thepage=385.xml"));
echo $xml->class->type->event['start_time'];
-
Try to use mysqli prepared statments they are very similar to PDO, and in my opinion very accurate way to work with mysql database. Because they function the same as PDO you only should replace class and function names.
-
What amount of data you have to see the difference?
It is possible that first script is slower because it is wandering between database reading and writing HTTP response, while second in first step only reads data from database and in second writes it...
-
yes it does in a sense as it shows one way of organizing the hierarchical tree data. But that's done for me. And it works. Now I'm trying to COPY a node and all its children and it's that operation I'm having trouble conceptualizing.
JR
I think You are using bad tree logic. It is better to realize tree in one table with fields:
node_id (PK)
parent_id (ID of parent node)
order (makes order between siblings from same tree level)
Top nodes doesn't have parent_id
Then make a recursive function which inputs top node of tree part which you want to copy.
Function should collect all nodes which have provided parent_id, loop through nodes and call itself again for any node until node has descendants.
-
Thanks dzelenika for your reply,
but the PHP login code involves making correspondent entries into the site's MYSQL database and thus when the auto logout occurs that information must be saved on the database (i.e. time of logout).
Now the PHP code for recording this info is already there, now what I wanted is additional code which will enable the logout to happen automatically without anyone having to click the page i.e. if the user returns, he will find himself logged out.
Thanks again for the reply
I think this is what you are looking for:
<script type="text/javascript"> var t=setTimeout("document.location=\"logoutPage.php\"",3600000); </script>
In logoutPage you can log any information or do whatever you want without any click
-
Both people who have tried my chat feature were using Firefox and i am using firefox too however it works fine for me. It was on a local server and ive uploaded it to an online server and it works ok, could that of been the problem?
Javascript doesn't depends on server.
The way you are checking pressed key is preferred in IE.
I think, but not 100% sure, that onKeyPress should return value to indicate that handled event.
Anyway look at:
http://www.w3schools.com/jsref/jsref_onkeypress.asp
-
In main program you can't see variables from function.
The easiest way to see variables from outer program is to collect variables into array then return array. For example instead of:
$shipping = number_format($shipping, 2, '.', '');
you could wrote:
$returnArray['shipping'] = number_format($shipping, 2, '.', ''); ....
and at the end instead of:
return $retStr;
you could wrote:
return $returnArray;
In outer program you should call function like this:
$arr = getShoppingCartInfo();
to collect values grabbed in function.
-
I don't understand meaning of term "output name".
Probably you would to see, from main program, variables grabbed in function?
-
after using this function that i found a few times, some people have said that when they type the keys dont register. does anyone know why?
On which browser?
a href link not working
in PHP Coding Help
Posted
'$name'
doesn't works
"$name"
works
you could use:
'some html' . $name . 'other html'