|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 27 Dec 2005 13:43:54 -0000 Issue 3873
php-general-digest-help
lists.php.net
Date: Tue Dec 27 2005 - 07:43:54 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 27 Dec 2005 13:43:54 -0000 Issue 3873
Topics (messages 227879 through 227885):
Re: Can the URL be controlled for more user-friendly readability? [SOLVED]
227879 by: Curt Zirzow
Re: Sessions...
227880 by: Curt Zirzow
Re: insert to DB
227881 by: adriano ghezzi
check this cool ajax based MVC framework for PHP5
227882 by: Hasin Hayder
php / mysql / js search result question
227883 by: Dave Carrera
Re: PDF documentation
227884 by: Rory Browne
Infinite subcategories
227885 by: Danny
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
On Mon, Dec 26, 2005 at 09:26:38PM +0900, Dave M G wrote:
>
> Thank you for the suggestions. Altering the rules of the Apache server
> seems to suggest the potential to have the effect I am after. I know
> nothing about configuring Apache, but I will try to learn.
> If my discovery process brings me back to PHP issues, then I will
> return here with more questions.
> I appreciate you taking the time to offer advice.
Another method that wasn't mentioned, which helps take the logic
needed to parse parameters in the more 'user-friendly' way is to
set up apache to treat a file as a directory so you could have:
http://domain.com/user/first.last.html
The 'user' is actually a file that is a php script that reads data
from $_SERVER['PATH_INFO'] and parses it as needed.
You just need to setup apache using:
<Files user>
SetHandler application/x-httpd-php
</Files>
and make a php script called user like:
<?php
var_dump($_SERVER['PATH_INFO'])'
?>
I prefer this method cause it removes any sort of programming logic
from apache, so if I decide, that well, i want to allow just
lastname.html, i only have one place to worry about the logic.
Curt.
--
cat .signature: No such file or directory
attached mail follows:
On Thu, Dec 22, 2005 at 11:56:12PM -0500, Chris Shiflett wrote:
> Greg Donald wrote:
> >I've been using this database driven PHP sessions setup for years:
> >
> >http://dbsessions.destiney.com/
>
> I offer a similar implementation:
>
> http://phpsecurity.org/code/ch08-2
Ok, i'll bite.. :)
One thing I tend to avoid is having empty values in the database (a
pet peev via the file system), if a typical session_start() is
issued and there is no data to be written i believe avoiding the
actual insert should be avoided, to avoid the extra overhead of
writing 'no data' to the db. The approach i used probably has a
flaw if cookie based session is *not* used.
Also, i'v always hated the 'global $dbh' approach, I'd rather see
a defined database handle within the session.
http://zirzow.dyndns.org/session/session.phps
session_db_conf.php:
<?php
$SESSION_DB_HOST = 'localhost';
$SESSION_DB_USER = 'session;;
//...
?>
session_config.php:
<?php
include('session/session.php');
Session_System_DB('session_db_conf.php', true);
?>
Curt.
--
cat .signature: No such file or directory
attached mail follows:
pls could you point out which instruction should insert record in db
thanks...
2005/12/18, Anasta <neretlis
westnet.com.au>:
>
> It just wont insert new data into DB--any ideas as i have gone over and
> over.
>
>
>
> <?
> mysql_connect("localhost","anasta","silteren");
>
> mysql_select_db("mytipperv1");
>
> if(!isset($cmd))
> {
> $result = mysql_query("select * from leaderboard order by ID");
>
> while($r=mysql_fetch_array($result))
>
> {
> //grab the title and the rating of the entry
> $id=$r["ID"];//take out the id
> $Name=$r["Name"];//take out the Name
> $Rating=$r["Rating"];//take out the Rating
>
>
> echo "$Name <a href='edit.php?cmd=edit&ID=$id'> Edit</a><br>";
>
>
> }
> }
> ?>
> <?
> if($_GET["cmd"]=="edit" || $_POST["cmd"]=="edit")
> {
> if (!isset($_POST["submit"]))
> {
> $id = $_GET["ID"];
> $sql = "SELECT * FROM leaderboard WHERE ID=$id";
> $result = mysql_query($sql);
> $myrow = mysql_fetch_array($result);
> ?>
>
> <form action="../craigs_DB/edit.php" method="post">
> <input type=hidden name="ID" value="<?php echo $myrow["ID"] ?>">
>
> Name: <INPUT TYPE="TEXT" NAME="Name" VALUE="<?php echo
> $myrow["Name"]
> ?>" SIZE=15 maxlength="15"><br><br>
> Rating: <INPUT TYPE="TEXT" NAME="Rating" VALUE="<?php echo
> $myrow["Rating"] ?>" SIZE=3 maxlength="3"><br><br>
> <input type="hidden" name="cmd" value="edit">
> <input type="submit" name="submit" value="submit">
> </form>
>
> <? } ?>
> <?
> if ($_POST["$submit"])
> {
> $Name = $_POST["Name"];
> $Rating = $_POST["Rating"];
>
> $sql = "UPDATE leaderboard SET Name='$Name', Rating='$Rating' WHERE
> ID=$id";
> //replace news with your table name above
> $result = mysql_query($sql);
> echo "Thank you! Information updated.";
> }
> }
> ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Hi all,
zephyr is an ajax based framework for php5 developers. you can easily
develop business applications using this robust framework. this is extremely
easy to learn and implement. you can deliver a full fledged ajax application
with strong business layer in backend within some minutes. installation and
deployment of packages that you develop for zephyr is hassle free. moreover
you will get all the features of most popular templating engine "smarty" and
powerfull data access layer "adoDB".
Just install this package and develop ajax applications.
Visit : http://zephyr-php.sourceforge.net
--
--------------------------------------------------------
Hasin Hayder
http://hasin.phpxperts.com
attached mail follows:
Hi List,
I have a very long list of customer names which i know is easy to get
from a mysql result using php, no prob there.
But what i would like to do is offer input box and when the user enters
a letter, i think this will require client side onchange(), the full
list, i think might be in an iframe, will move to the first instance of
user input.
Example:
1 Alpha Customer
2 Apple Customer
3 Beta Customer
4 Crazy customer
5 Doppy customer
User input is "a" so the list moves to first instance of "a". User
continues to input "ap" so the list moves to "2 Apple Customer" and so on.
If the user had input "d" then the list would move to "5 Doppy customer"
and i suppose this could become selected ready for the user to hit the
return key to select this customer.
I would prefer to not do multiple "POSTS" and return result, which i can
do already, so i think some natty client side JS might do the trick but
i have very little knowledge of this.
Any urls or direct help / advise is gratefully received.
Thank you in advance
Dave c
attached mail follows:
/me thinks that the OP needs to DL the html.gz manual, procure
htmldoc, chant the magic incantation(i.e. type in the correct
command), and wait for his PDF document to appear.
On 12/25/05, Paul Waring <pwaring
gmail.com> wrote:
> On 12/25/05, John Meyer <john.l.meyer
gmail.com> wrote:
> > Hi, does the PHP document come in a PDF form?
>
> No, it comes in the online format, HTML for offline viewing and
> Windows HTML help. However, there is a guide to editing the XML
> sources that can be found at the following URL:
>
> http://doc.php.net/php/dochowto/
>
> You might be able to use the sources and some tools to convert the
> documentation to PDF.
>
> Paul
>
> --
> Rogue Tory
> http://www.roguetory.org.uk
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Hi All,
Time ago, somebody sent a sample to the list about how to do an "infinite"
subcategories, based on parent field. I´ve been googling, and searching my
mail history, but cannot find it.....
The objective is to create a tree with categories and subcategories of
documents, but with no limit into the subcategory depth. Anybody remember
that thread, or can point me to a solution?
Thank you
Regards
--
dpc
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]