Hi,
I came across this script in javascript which
generates a session id .. and was wondering if any-one
knows the exact equivalent in PHP (or if one could
reconstruct it in PHP)
The script is really short ..
--->
time=new Date()
V=Math&&Math.random?Math.floor(Math.random()*10):time
please (!) be paranoid and use mysql_real_escape_string() on every variable
you are inserting into a mysql command!
example:
function save_record($table,$data,$fieldlist)
{
$fieldlist=preg_replace("/[^A-Za-z0-9_]+/"," ",$fieldlist);
$fields=preg_split("/[ ]+/",trim($fieldlist));
$sql="ins
Oh, and the error before then was becuase you had not put quotes
around the values in your query, not just the whole query; i.e., ...
"VALUES ('Bob', 'Smith', '123 On Some Street'"...
On 06/07/06, Phill Sparks <[EMAIL PROTECTED]> wrote:
> There's a comma (,) after phhome and again after the phone
you can use Safari books where for a low monthly fee you can view 5 or 10
books. they have tons of PHP/MySQL books and you can learn there.
www.devx.com and choose Premier Club on the left hand side
- Original Message
From: Wade Smart <[EMAIL PROTECTED]>
To: php-list@yahoogroups.com
In message <[EMAIL PROTECTED]>, Wade Smart
<[EMAIL PROTECTED]> writes
>07052006 1845 GMT-6
>
>Im still having a bit of a problem with this insert.
>
>Im using the double quotes but this is the error:
>
>Players(fname,lname,address,city,state,zip,phhome,)
>VALUES (Bob,Smith,123 On Some Street, Ba
In message <[EMAIL PROTECTED]>, Mian Waqas
<[EMAIL PROTECTED]> writes
>Hi Friends,
>
>My client requires that his site should open only using www in the URL
>like http://www.sitename.com/anypage.php and no one should be allowed
>to access it using this URL http://sitename.com/anypage.php. If some
There's a comma (,) after phhome and again after the phone number.
this is the cause of the error. There should be another field, or no
comma.
On 06/07/06, Wade Smart <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> 07052006 1845 GMT-6
>
> Im still having a bit of a problem with this insert.
>
> Im usi
In message <[EMAIL PROTECTED]>, Wade Smart
<[EMAIL PROTECTED]> writes
>07092006 0730 GMT-6
>
>You can use CSS for this as well. On hover the images change out. Its
>pretty cool.
Can you give us a clue as to how?
--
Pete Clark
Free advertising for your website, business, or organisation at:
ht
--- Bruno Lustosa <[EMAIL PROTECTED]> wrote:
> On 7/5/06, Wade Smart <[EMAIL PROTECTED]> wrote:
> > For my own pages I have this:
> > include('../header/top.htm');
> >
> > That says its out of the current folder and into the header.
> > As I read yours, is out of the current folder and into t
You might want something more like..
foreach ($_POST as $nkey => $new)
{
$old = $olddata[$nkey];
if ($old == $new)
{
// Match
}
else
{
// No Match
}
}
Note: This will not check for things that are not inside $_POST.
On 02/07/06, Wade Smart <[EMAIL PROT
--- Wade Smart <[EMAIL PROTECTED]> wrote:
> 06272006 1731 GMT-6
>
> session_start();
> if(isset($SESSION['user'])){
> // allow access to this folder
> } else {
> // redirect to login
> }
The code above probably wasn't tested. The proper superglobal name for
sessions is $_SESSION no
11 matches
Mail list logo