Is there a way of getting from php the screen size?
Sorry but as php is only server-side, there is no way to get the screen
size. You have to use javascript and send the result to the page again, as
you suggested yourself.
Regards,
Bastian
--
PHP Database Mailing List (http://www.php.net/)
Actually this is incorrect also and will only result in another parse error
... you have (), which is fine, but then {)}, which doesn't make any sense
to the parser.
Regards,
Matthew Moldvan
---
System Administrator
Trilogy International, Inc
on 2/27/03 11:09 PM, Petre NICOARA at [EMAIL PROTECTED] appended the
following bits to my mbox:
I've found this stuff into a javascript, but I need to be able to
retrieve it through php, only in one file. The javascript is doing this
through 2 file, one get the info, and passes it to a form in
How can a make a query that lists all the fields where a datefield as
the date of tomorow?
thanks
go to mysql.com en look for date
-Original Message-
From: Jorge Miguel Fonseca Martins [mailto:[EMAIL PROTECTED]
Sent: vrijdag 28 februari 2003 16:23
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Date
How can a make a query that lists all the fields where a datefield as
the date of tomorow?
How would I store an array in the database? I want to store 2 things.
One array of shirt sizes and one array of which holds other arrays.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You could store it as a series of comma separated values in a text field and
manipulate it using implode() and explode() on the comma separators. I've
done this for small arrays and it works OK. WOuld like to know if there's an
easier way though. Not that this is all that bad. I'm just lazy. ;^)
just as a quick fix. I use the following snip to take an array of
choices, enter it into a varchar field (or text if you expect alot) and
extract back to array:
$choicesArray is a list of checkboxes from a form
// put data into table
$checkList = implode(;, $choicesArray);
If your array is multidimensional, you could store it in a javascript-style:
// get the print_r()
// replace (recursively) all instances of Array( .. ) by [...]
If you ever plan to write a class or a function to do that, let me know!
Ignatius
-
How would I store an array in the database? I want to store 2 things.
One array of shirt sizes and one array of which holds other arrays.
Easy.
script language=php
$singleDimArray = array( 1, 2, 3, 4, 5 );
$multiDimArray = array( array( this = that, here = there ),
Thanks!
I checked out the php docs,
serialize() returns a string containing a byte-stream representation of
value that can be stored anywhere.
Perfect!
--- Jonathan
-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 10:43 AM
To:
Hello,
I've an interbase locking question. Sometime i got interbase deadlock from
php scripts at updates and at inserts. I'm using simple ibase_query, and as
i've
read the manual of the interbase, it should handle the locking with the
default transaction
WAIT option. Is it enoug to using
How would I store an array in the database? I want to store 2 things.
One array of shirt sizes and one array of which holds other arrays.
$safe = addslashes(serialize($array));
and store $safe into a text column. Use
$array = unserialize($database_data);
to get the array back.
---John
How would I store an array in the database? I want to store 2 things.
One array of shirt sizes and one array of which holds other arrays.
[snip]
$query = INSERT INTO table
( field1, field2 )
VALUES
( \ . serialize( $singleDimArray ) .
FYI: Make sure you addslashes() _after_ you serialize your array if it can
contain quotes. Everything else remains the same.
Yeah, my bad. Good catch.
Chris
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi all,
I'm just starting out with writing PHP and would like to get help with writing the
code for my forms to have the data sent to a database. Here is one of my forms:
?php
if ($submit == Submit){
echo Your listing has been submitted;
echo Go back a
Ok, maybe this is strictly a phpMyAdmin Q, but I'm sure many of use it
=)
I have a server at home which runs phpMyAdmin.
I also run it locally on my laptop. The cfg_uri for both is
http://localhost/phpMyAdmin/
When I open a web browser (IE), I go to
http://mydomainonmyserverathome/phpMyAdmin
Hi! I am having a problem with Unknown() error.
Here is my code:
echo 2;
mysql_query(INSERT INTO sessions SET sessionid='{$sid}',
ipaddr='{$_SERVER[REMOTE_ADDR]}, page='{$_SERVER[SCRIPT_FILENAME]}',
dt='.$dt.')
or OnErr(2);
echo 3;
I get this error:
Notice: Unknown(): The session bug
Just a guess, but do you have a variable (global variable) named $15
someplace? If you do, PHP does not allow variable names that start with
numbers.
-Original Message-
From: AP Fritts [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 3:51 PM
To: [EMAIL PROTECTED]
Subject:
How do I write a script that will automatically create an ID in the
database. Here is a sample
-- orderform.shtml
form action=order.php method=post
First Nameinput type=text name=fnamebr
Last Nameinput type=text name=lname
input
Create a customer_id field in the database, make it primary, int, and
autoincrement
--- Jonathan
-Original Message-
From: Dan Kelly [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 6:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Customer id
How do I write a script that
You need to create a column in the target table similar to:
custID SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT
When you run your INSERT query, you pass NULL to that column and the ID will
be created/auto incremented for you.
Is that what you mean?
Rich
-Original Message-
From:
Hey that worked guys.. Thanks..Dan
You need to create a column in the target table similar to:
custID SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT
When you run your INSERT query, you pass NULL to that column and the ID will
be created/auto incremented for you.
Is that what you mean?
Rich
Hi all ! does anyone know if there is a way to get pgp support in
php.
-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more
I need to create some simple web forms for entering, changing, deleteing information
from a fairly simple MySQL database. This is to be for internal use, so doesn't have
to be really fancy or have alot of error checking.
I could make a form for each table myself, but I would think their is an
What's wrong with PhpMyAdmin?
Jeremy N.E. Proffitt wrote:
I need to create some simple web forms for entering, changing, deleteing information
from a fairly simple MySQL database. This is to be for internal use, so doesn't have
to be really fancy or have alot of error checking.
I could make
The wrap it in an exec() or one of the other exec type functions ;)
$result = exec(mysqldump -uMyUser -pMyPass MyDB db_dump_file.sql);
-Original Message-
From: Jonathan Villa [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 3:36 PM
To: [EMAIL PROTECTED]
Subject: RE:
Hello,
I have 2 tables users table, that stores user info, and photos table,
i want to select all users with one photo form photos table, but i don't
want it to be photos * users = result.
Is there way to do it?
Assuming you mean, you have a table called user_info and another
on 2/28/03 3:15 PM, Daniel Harik at [EMAIL PROTECTED] appended the following
bits to my mbox:
Thank You for your reply, but the problem is that users may have many
photos, and i need to get only one, i use folllowing sql:
SELECT users.username, photos.file FROM users left join photos on
--- Daniel Harik [EMAIL PROTECTED] wrote:
Hello,
I have 2 tables users table, that stores user info, and photos
table,
i want to select all users with one photo form photos table,
but i don't
want it to be photos * users = result.
Is there way to do it?
Assuming you
30 matches
Mail list logo