Search found 16 matches
- Mon Apr 19, 2004 9:40 am
- Forum: PHP - Code
- Topic: Displaying the remaining data in next page
- Replies: 1
- Views: 203
Displaying the remaining data in next page
At the moment when I want to display all the guests in my guest page the records are shown in a single page and it doesn't look really neat. Is there a way of making the records go to a new page after a certain number of records have been displayed in the page?
- Mon Apr 19, 2004 9:34 am
- Forum: PHP - Code
- Topic: error with array item
- Replies: 3
- Views: 309
- Mon Apr 19, 2004 9:14 am
- Forum: PHP - Code
- Topic: error with array item
- Replies: 3
- Views: 309
- Mon Apr 19, 2004 9:13 am
- Forum: PHP - Code
- Topic: error with array item
- Replies: 3
- Views: 309
error with array item
<?php mysql_select_db('test'); $entryid[] = $HTTP_POST_VARS['entry_id[]']; while (list($key, $value) = each($entryid)) { if ( !empty( $value)) { print "<li>Deleting entry #$value\n"; $query = "delete from guestBook where entry_id = $value"; $result = mysql_query($query); ?> the ...
- Mon Apr 19, 2004 8:46 am
- Forum: PHP - Code
- Topic: timestamping
- Replies: 14
- Views: 939
timestamping
This is how I created my table in MySql create table guestBook ( entry_id integer not null auto_increment, name varchar(40) null, location varchar(40) null, email varchar(40) null, url varchar(40) null, comments text null, created timestamp, remote_addr varchar(20) null , key guestbook_key (entry_id...
- Mon Apr 19, 2004 8:37 am
- Forum: Databases
- Topic: displaying the last record first
- Replies: 3
- Views: 239
That's neat. It's working now. Muchas gracias amigo
This is what I wrote:
Here create is actually defined as timestamp in MySql which is exactly what you said, right? Righteo, cheerz mate.
Code: Select all
<?php
$result = mysql_query('select * from guestBook order by created desc ;');
?>- Mon Apr 19, 2004 8:32 am
- Forum: Databases
- Topic: displaying the last record first
- Replies: 3
- Views: 239
displaying the last record first
I am using this to display the list of guests who has signed my guest book but the problem is the guest who signed the book most recently goes to the very bottom of the page. Here's part of the code that I wrote: <?php $result = mysql_query('select * from guestBook ;'); $num_results = mysql_num_rows...
- Mon Apr 19, 2004 8:23 am
- Forum: PHP - Code
- Topic: validating user input
- Replies: 3
- Views: 667
- Mon Apr 19, 2004 8:19 am
- Forum: PHP - Code
- Topic: email validation
- Replies: 1
- Views: 194
email validation
<?php if ( !checkString( $email) || !eregi( "^[A-Za-z0-9\_-]+@[A-Za-z0-9\_-]+.[A-Za-z0-9\_-]+.*", $email)) { echo "You have entered an <b>invalid email</b>.<br> Please go back and try again."; exit; } ?> The above code works to some extent. If the user does not input an '@' then...
- Mon Apr 19, 2004 8:13 am
- Forum: PHP - Code
- Topic: validating user input
- Replies: 3
- Views: 667
validating user input
I am using the following to validate the field where the user inputs his/her email address... <?php if ( !checkString( $email) || !eregi( "^[A-Za-z0-9\_-]+@[A-Za-z0-9\_-]+.[A-Za-z0-9\_-]+.*", $email)) { echo "You have entered an <b>invalid email</b>.<br> Please go back and try again.&...
- Sun Apr 18, 2004 11:04 am
- Forum: PHP - Code
- Topic: Authentication
- Replies: 3
- Views: 437
authentication
Yup, that's it. That was exactly what I was asking for. :D Merci beaucoup! I was actually using Header("WWW-Authenticate: Basic realm=\""); Header("HTTP/1.0 401 Unauthorized"); and I get this pop up dialogue box requesting for the username and password. It seems though, that...
- Sun Apr 18, 2004 10:42 am
- Forum: PHP - Code
- Topic: Running PHP as CGI or module???
- Replies: 1
- Views: 381
Running PHP as CGI or module???
What's this about CGI and module versions of PHP? What do I need to modify in order configure my PHP to run as a module instead of a CGI and what's the basic difference between the two?
- Sun Apr 18, 2004 10:28 am
- Forum: PHP - Code
- Topic: Authentication
- Replies: 3
- Views: 437
Authentication
I am designing a guest book using php and mysql. I need to password protect the php page where I will be allowing the administrator(only!) to delete guests from the guest book. The rest of the pages like signing in and viewing do not require authentication. How can I go about restricting the delete ...
- Sun Apr 18, 2004 10:21 am
- Forum: PHP - Code
- Topic: PHP forms
- Replies: 2
- Views: 620
PHP forms
I am using an HTML form to request data from the user and submitting it to a PHP file to process the data and display the results. Is it possible to do this just using one PHP file instead of having to write a separate HTML file?
- Sun Apr 18, 2004 10:07 am
- Forum: PHP - Code
- Topic: Validation using PHP
- Replies: 2
- Views: 285