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
[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-- ?php $value = $_POST['colors']; $blue = Royale Blue; $teal = Teal; $green = Hunter Green; $maroon = Maroon; $grey = Grey; if ($value == $blue){ setcookie(blue,time()+3600);} elseif ($value == $teal){ setcookie(teal,time()+3600);} elseif ($value == $green){ setcookie(green,time()+3600);} elseif ($value == $maroon){ setcookie(maroon,time()+3600);} elseif ($value == $grey){ setcookie(grey,time()+3600);} else { echo Nothing isset!; } ? centerbh3font face=verdana?php echo $value ? has been set!/h3brh5a href=categories.php?cat=homeClick Here/a to return back to the homepage!/h5 /b/font/center - and the cookie checker - ?php echo link rel=stylesheet href=style.css type=text/css; if (isset($_COOKIE['blue'])){ echo link rel=stylesheet href=styleblue.css type=text/css;} elseif (isset($_COOKIE['teal'])){ echo link rel=stylesheet href=styleteal.css type=text/css;} elseif (isset($_COOKIE['green'])){ echo link rel=stylesheet href=stylegreen.css type=text/css;} elseif (isset($_COOKIE['maroon'])){ echo link rel=stylesheet href=stylemaroon.css type=text/css;} elseif (isset($_COOKIE['grey'])){ echo link rel=stylesheet href=stylegrey.css type=text/css;} ? - Thanks for everyones help.. Stevie
[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] Splice problem
My problem is that I am splicing an array and then echoing the array [code] ?php $input = array(red, green, blue, yellow); array_splice($input, 2); echo $input; ? [/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] Whats wrong with my code?
Can someone spot what Is wrong with my code? ?php $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; case museums: $includes = /includes/museums.html; break; case othernews: $includes = /includes/othernews.html; break; case pictures: $includes = /includes/pictures.html; break; case politics: $includes = includes/politics.html; break; case quotations: $includes = /includes/quotes.html; break; case recreation: $includes = /includes/recreation.html; break; case reference: $includes = /includes/reference.html; break; case reviews: $includes = /includes/reviews.html; break; case search: $includes = /includes/search.html; break; case society: $include = /includes/society.html; break; case sports: $include = /includes/sportsnews.html; break; case studyhelp: $include = /includes/study.html; break; case travel: $include = /includes/travel.html; break; case USA: $includes = /includes/usa.html; break; case USNews: $includes = includes/usnews.html; break; case weather: $includes = /includes/weather.html; break; case webmaster: $includes = /includes/webmaster.html; break; case goodbad: $includes = /includes/goodbad.html; break; case world: $includes = /includes/world.html; break; } include ($include) ? 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??php $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; case "museums": $includes = "/includes/museums.html"; break; case "othernews": $includes = "/includes/othernews.html"; break;case "pictures": $includes = "/includes/pictures.html"; break; case "politics": $includes = "includes/politics.html"; break; case "quotations": $includes = "/includes/quotes.html"; break; case "recreation": $includes = "/includes/recreation.html"; break;case "reference": $includes = "/includes/reference.html"; break; case "reviews": $includes = "/includes/reviews.html"; break; case "search": $includes = "/includes/search.html"; break;case "society": $include = "/includes/society.html"; break; case "sports": $include = "/includes/sportsnews.html"; break; case "studyhelp": $include = "/includes/study.html"; break;case "travel": $include = "/includes/travel.html"; break; case "USA": $includes = "/includes/usa.html"; break; case "USNews": $includes = "includes/usnews.html"; break;case "weather": $includes = "/includes/weather.html"; break; case "webmaster": $includes = "/includes/webmaster.html"; break; case "goodbad": $includes = "/includes/goodbad.html"; break;case "world": $includes = "/includes/world.html"; break; } include ($include) ? 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[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?
Whats wrong with this title?php echo Thank You, $senderemail; ?/title where $senderemail = $_POST['from']; It doesnt It only echos thank you. Why?
[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] help with parse error
I have a parse error on line 12 -- --- ?php 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 Title, SubT, Author, Story FROM SiteNews; $news = mysql_query($sql,$link) or die(mysql_error()); if ($news){ if (mysql_num_rows($news)== 0){ echo(No newsitems found.); } else{ while ($row = mysql_fetch_assoc($news)){ echo(b); echo(font size=6); echo($row['Title']. br /); echo(/font); echo(font size=4); echo($row['SubT'].br /); echo(/font); echo(/b); echo($row['Author']. br /); echo($row['Story']); echo(hr noshade color=black size=1/); } } } else{ echo(Queryproblem); } ? -- Can anyone see what the error is?? I can't Thanks
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] In need of a script
Can someone show me an example of some code that works something like this : ?php if cookie is present redirect to a certain page ? 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 -- ?php if ($_COOKIE['pagename']) { header('Location: 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 : ?php if cookie is present redirect to a certain page ? ?php // this must be the first line in the script (or use output 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'); ?
[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 ?php 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--- ?php 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().'p'.$sql.'/p'); if ($news){ if (mysql_num_rows($news)== 0){ echo (No newsitems found.); } else{ while ($row = mysql_fetch_assoc($news)){ echo(p); echo($row['Alias']. br /); echo($row['NewsDate'].br /); echo($row['News']); echo(/p); echo(hr /); } } } 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 - - - body hr noshade color=black size=2 font face=Verdana, sans-serif size=1 h2BMyPHP Site News v1.0/b/h2 Table border=0 width=100% tr td width=20% valign=Top form action=sitenews.php method=POST Your Alias:/td td width=80% valign=Top input type=text name=newsperson style=border: 1px solid black; font-family: Verdana, sans-serif; onFocus=this.className='focus' onBlur=this.className='blur'/td /tr tr td width=20%Date:/td td width=80%input type=text name=date style=border: 1px solid black; font-family: Verdana, sans-serif; onFocus=this.className='focus' onBlur=this.className='blur' font size=2Ex) 2003-08-19/font/td /tr Tr /tr td width=20% valign=TopYour News:brfont size=2Enter as much text as you would like here/font/td Td width=80% valign=toptextarea rows=5 cols=45 name=thenews style=border: 1px solid black; font-family: Verdana, sans-serif; onFocus=this.className='focus' onBlur=this.className='blur'/textarea/td /tr tr td width=20%/td td width=80% input type=submit value=Submit Entry class=mybuttoninput type=reset value=Clear Form class=mybutton/td /tr /table /form hr noshade color=black size=2 centerfont face=Verdana, sans-serif size=1PHP Site News developed by Stevie Peele/font/center /body - - 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 ?php 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--- ?php 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().'p'.$sql.'/p'); if ($news){ if (mysql_num_rows($news)== 0){ echo (No newsitems found.); } else{ while ($row = mysql_fetch_assoc($news)){ echo(p); echo($row['Alias']. br /); echo($row['NewsDate'].br /); echo($row['News']); echo(/p); echo(hr /); } } } 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] 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