[PHP] Making a cookie never expire
How can I make a cookie never expire? Thanks, Stevie The best thing to hit the internet in years - Juno SpeedBand! Surf the web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com to sign up today! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with a script
I've been working on a script for quite some time now, particulary a site news script. Heres how it works 1. Information is passed from a form to the database 2. Table is selected to a page to be viewed by the general public. The problem is, when I use the form, there are no errors in the script, but nothing is entered into the database. Here are my scripts The Query CREATE TABLE SiteNews ( Alias varchar(50) NOT NULL default '0', News BLOB NOT NULL, NewsDate Date NOT NULL ) TYPE=MyISAM - - form action - - Viewing the news script--- '.$sql.''); if ($news){ if (mysql_num_rows($news)== 0){ echo ("No newsitems found."); } else{ while ($row = mysql_fetch_assoc($news)){ echo(""); echo($row['Alias']. ""); echo($row['NewsDate'].""); echo($row['News']); echo(""); echo(""); } } } else{ echo("Queryproblem"); } ?> - - Can anyone see what is wrong?? Thanks
Re: [PHP] Help with a script
Heres the source of the page where I initially enter the data - - - MyPHP Site News v1.0 Your Alias: Date: Ex) 2003-08-19 Your News:Enter as much text as you would like here PHP Site News developed by Stevie Peele - - On Sat, 23 Aug 2003 08:18:19 -0700 "Jim Lucas" <[EMAIL PROTECTED]> writes: > what is the source for the page that you initially enter the data on > the web > form look like? > > Jim Lucas > - Original Message - > From: "Stevie D Peele" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, August 23, 2003 6:25 AM > Subject: [PHP] Help with a script > > > > I've been working on a script for quite some time now, particulary > a site > > news script. Heres how it works > > > > 1. Information is passed from a form to the database > > 2. Table is selected to a page to be viewed by the general > public. > > > > The problem is, when I use the form, there are no errors in the > script, > > but nothing is entered into the database. > > > > Here are my scripts > > The > > Query > > CREATE TABLE SiteNews > > ( > > Alias varchar(50) NOT NULL default '0', > > News BLOB NOT NULL, > > NewsDate Date NOT NULL > > ) TYPE=MyISAM > > > - > > - > > > > form > > action > > > include ('config.php'); > > $link = @mysql_pconnect($location, $username, $password) > > or die("Could not connect to the databaseserver. Please go > back and > > try again or try again later."); > > @mysql_select_db($database, $link) > > or die ("Could not select database. Please go back and try > again or > > try again later."); > > $sql_insert = "INSERT INTO SiteNews ('Alias','News','NewsDate') > > VALUES ('". addslashes($_POST['newsperson']) . "','" . > $_POST['date'] . > > "','" . addslashes($_POST['thenews']) . "')"; > > > > $result = mysql_query($sql_insert, $link); > > echo (mysql_affected_rows($link) . " News entry inserted"); > > ?> > > > - > > - > > > > Viewing the news > > script--- > > > include ('config.php'); > > $link = @mysql_pconnect($location, $username, $password) > > or die("Could not connect to the databaseserver. Please go > back and > > try again or try again later."); > > @mysql_select_db($database,$link) > > or die ("Could not select database. Please go back and try > again or > > try again later."); > > $sql = "SELECT Alias, NewsDate, News FROM SiteNews ORDER BY > NewsDate > > DESC"; > > $news = mysql_query($sql,$link) or > die(mysql_error().''.$sql.''); > > > > if ($news){ > >if (mysql_num_rows($news)== 0){ > > echo ("No newsitems found."); > >} > >else{ > > while ($row = mysql_fetch_assoc($news)){ > > echo(""); > > echo($row['Alias']. ""); > > echo($row['NewsDate'].""); > > echo($row['News']); > > echo(""); > > echo(""); > > } > > } > > } > > else{ > >echo("Queryproblem"); > > } > > > > ?> > > > - > > - > > > > Can anyone see what is wrong?? > > > > Thanks > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > The best thing to hit the internet in years - Juno SpeedBand! Surf the web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com to sign up today! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Expiration time of a cookie
What is the longest expiration time of a cookie? Thanks The best thing to hit the internet in years - Juno SpeedBand! Surf the web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com to sign up today! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] In need of a script
Can someone show me an example of some code that works something like this : Thanks The best thing to hit the internet in years - Juno SpeedBand! Surf the web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com to sign up today! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] In need of a script
Heres what I wrote -- http://www.net-riches.com/800x600.html'); } ?> and I got a parse error on line 4, but I do not see what is wrong on line 4! Can anyone else see? Thanks On Sun, 24 Aug 2003 10:04:50 -0400 "Matt" <[EMAIL PROTECTED]> writes: > On Sunday, August 24, 2003 at 9:49 AM Stevie D Peele wrote: > > > Can someone show me an example of some code that works something > like > > this : > > > > > > > if cookie is present > > redirect to a certain page > > > > ?> > buffering) -- see http://www.php.net/header for explanation > if ($_COOKIE['cookie_I_want_to_know_about']) { > header('Location: http://www.someserver.com/page.php'); > ?> > > > >
Re: [PHP] mail() question
What is on line 235?? That would help us - SDP On Mon, 25 Aug 2003 01:09:29 +0200 Matthias Wulkow <[EMAIL PROTECTED]> writes: > > Hi php-general, > > I have followig error reported: > > Fatal error: Call to undefined function: mail() in > /usr/local/www/login.php on line 235 > > What is the trouble here? If I would have trouble because of > delivery, normally mail would return false. But here... > > I have php4.3.1 running on linux. I just installed postfix to have > the > sendmail binary at the right place. > > Thx for help > > SvT > > -- > Who is the ennemy? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >
[PHP] help with parse error
I have a parse error on line 12 -- --- "); echo(""); echo($row['Title']. ""); echo(""); echo(""); echo($row['SubT'].""); echo(""); echo(""); echo($row['Author']. ""); echo($row['Story']); echo(""); } } } else{ echo("Queryproblem"); } ?> -- Can anyone see what the error is?? I can't Thanks
[PHP] superglobals?
What do we call things like this -- $_POST['name'], $_SERVER['remote add'] Are they superglobals and where can I find a list of these? Thanks The best thing to hit the internet in years - Juno SpeedBand! Surf the web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com to sign up today! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Whats wrong?
Whats wrong with this where $senderemail = $_POST['from']; It doesnt It only echos thank you. Why?
[PHP] space sensitive?
Is PHP space sensitive?? The best thing to hit the internet in years - Juno SpeedBand! Surf the web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com to sign up today! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Whats wrong with my code?
Can someone spot what Is wrong with my code? It says Line 195 which is the ?> Would it matter I don't have all of these files (i.e. /includes/world.html) were uploaded yet? Thanks, Stevie
Re: [PHP] Whats wrong with my code?
Okay, I took all the extra spaces out of my code, So it is now 151 lines. I have attached that code, instead of posting it in my mail. It says Warning: Unable to access /includes/home.html in /usr/local/psa/home/vhosts/net-riches.com/httpdocs/includes/category.php on line 150Warning: Failed opening '/includes/home.html' for inclusion (include_path='.:/usr/local/psa/apache/lib/php') in /usr/local/psa/home/vhosts/net-riches.com/httpdocs/includes/category.php on line 150 In the code, line 150 is the line where 'include ($include);' is (without the quotes)... Thanks for all your help Stevie On Tue, 16 Sep 2003 16:44:25 -0500 "Dan J. Rychlik" <[EMAIL PROTECTED]> writes:> Your missing your default for your case switch statement> > And you ; at the end of line on your last include statement..> > -Dan> > > > - Original Message - > From: "Stevie D Peele" <[EMAIL PROTECTED]>> To: <[EMAIL PROTECTED]>> Sent: Tuesday, September 16, 2003 4:10 PM> Subject: [PHP] Whats wrong with my code?> > > > Can someone spot what Is wrong with my code?> > > > > > > > > > $page = $_GET['id'];> > switch ($page) > > {> > case "home":> > $include = "/includes/index.html";> > break;> > > > case "arts":> > $include = "/includes/arts.html";> > break;> > > > case "aaexpert":> > $include = "/includes/aaexpert.html";> > break;> > > > case "career":> > $include = "/includes/career.html";> > break;> > > > case "comics":> > $include = "/includes/comics.html";> > break;> > > > case "graphics":> > $include = "/includes/graphics.html";> > break;> > > > case "computers":> > $include = "includes/computers.html";> > break;> > > > case "consumers":> > $include = "/includes/consumer.html";> > break;> > > > case "dailies":> > $include = "/includes/dailies.html";> > break;> > > > case "forums":> > $include = "/includes/forums.html";> > break;> > > > case "downloads":> > $include = "/includes/downloads.html";> > break;> > > > case "editors":> > $include = "/includes/editors.html";> > break;> > > > case "educational":> > $include = "/includes/educational.html";> > break;> > > > case "electronics":> > $include = "/includes/electronics.html";> > break;> > > > case "entertainment":> > $include = "/includes/entertainment.html";> > break;> > > > case "shopping":> > $include = "/includes/shopping.html";> > break;> > > > case "free":> > $include = "/includes/freetime.html";> > break;> > > > case "government":> > $include = "/includes/government.html";> > break;> > > > case "governments":> > $includes = "/includes/governments.html";> > break;> > > > case "healthnews":> > $includes = "/includes/healthnews.html";> > break;> > > > case "homegarden":> > $includes = "/includes/homegarden.html";> > break;> > > > case "homework":> > $includes = "/includes/homework.html";> > break;> > > > case "stuffworks":> > $includes = "/includes/hsworks.html";> > break;> > > > case "inthenews":> > $includes = "/includes/inthenews.html";> > break;> > > > case "infokiosk":> > $includes = "/includes/kiosk.html";> > break;> > > > case "knowledge":> > $includes = "/includes/builder.html";> > break;> > > > case "money":> > $includes = "/includes/money.html";> > break;> > > > case "yahoo":> > $includes = "/includes/yahoo.html";> > break;> &
[PHP] Splice problem
My problem is that I am splicing an array and then echoing the array [code] [/code] and all that is echoed is "Array." I want red green to be echoed. Thanks The best thing to hit the internet in years - Juno SpeedBand! Surf the web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com to sign up today! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Clear ALL Cookies previously set
How can I clear all cookies that have been previously set? I want this in an if statement so something like if ($value == $blue){ clear all cookies; setcookie("name",time()+3600); } Thanks
[PHP] I have a problem :: help please?
I'm making my own style sheet switcher. Here's my problem. My style switcher will switch the style once or twice, sometimes only once, and then It will not do It again until the cookie expires, can somebody spot what I am doing wrong? ---form---action-- has been set!Click Here to return back to the homepage! - and the cookie checker - "; if (isset($_COOKIE['blue'])){ echo "";} elseif (isset($_COOKIE['teal'])){ echo "";} elseif (isset($_COOKIE['green'])){ echo "";} elseif (isset($_COOKIE['maroon'])){ echo "";} elseif (isset($_COOKIE['grey'])){ echo "";} ?> - Thanks for everyones help.. Stevie
Re: [PHP] php|cruise
I would love to go, but 15 year olds don't usually have 1500 dollars.:) Stevie On Sat, 20 Sep 2003 23:30:51 -0400 "John W. Holmes" <[EMAIL PROTECTED]> writes: > Is anyone planning on going to this? > > http://www.phparch.com/cruise/ > > I'm trying to go. It would be nice to put a face to the name with a > few > people out there. Let me know. > > -- > ---John Holmes... > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > php|architect: The Magazine for PHP Professionals www.phparch.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >