Jump to content

jamesbond110

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jamesbond110's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. didnt need cookie variables for this anyway - but solved on my own
  2. Warning: Cannot modify header information - headers already sent by (output started at /mounted-storage/home81a/sub003/sc45384-ACYD/www/music/music.php:3) in /mounted-storage/home81a/sub003/sc45384-ACYD/www/music/music.php on line 3
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><?php setcookie("band", "sugarcult", time()+3600);?><html xmlns="http://www.w3.org/1999/xhtml"> <head> the cookie is set but i still get the error i've changed all echos to print and all includes to require... still can't get it im using the cookie variable for:
  4. To kenrbnsn: I have the code correctly quoted, but for some reason I copied it wrong onto my post. eh. To rhodesa: Worked!... Well thanks for the help then. Thanks for being patient with an idiot
  5. Hi. I have a Javascript menu, and I want to put it in a PHP document. You click the link and more links show up below it. The external javascript is put in the <head> and then the HTML for the menu is in an external php file and put in with an include. EXAMPLE: <head> <script src="scripts/nav.js" type="text/javascript"></script> </head> <div id="masterdiv"> <?php include 'scripts/nav.php'; ?> </div> nav.php looks like <?php echo '<div class="menutitle" onclick="SwitchMenu("sub1")">Home</div> <span class="submenu" id="sub1"> <a href="new.html">Newly Added</a><br> <a href="best.html">Top Rated</a><br> <a href="editorpick.html">Editor Picks</a><br> <a href="featured.html">Featured</a><br> </span> ?> But the script does not work. Live Demo: http://www.tobylands.com
  6. Hi, does anyone know if and how to do this: 1) Access a specified directory and look for all .php files. 2) Identify <title> and <meta keyword> tags. 3) Create a list attributing title and keywords to the .php files For example: Output: [a href=aa1.php]Title1[/a] | Keywords 1 [a href=aa2.php]Title2[/a] | Keywords 2 [a href=aa3.php]Title3[/a] | Keywords 3 [a href=aa4.php]Title4[/a] | Keywords 4 Any ideas and help for this nooblet?
  7. Did what you told to do mate and Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/www/tobysplayground.100webspace.net/Phat Cat Productions/news/data/Default.tpl on line 44 So I think I should just show you the entire .tpl file. I'm using Cutenews manager if you've had experience with that. <?PHP ///////////////////// TEMPLATE Default ///////////////////// $template_active = <<<HTML <div style="margin-bottom:20px;"> <div class="h"><strong>{title}</strong></div> <div style="text-align:justify;margin-bottom:5px;">{short-story}</div> <div style="float: right;">[com-link]{comments-num} Comments[/com-link]</div> <div><em>Posted on {date} by {author}</em></div></div> HTML; $template_full = <<<HTML <div style="margin-bottom:20px;"> <div class="h"><strong>{title}</strong></div> <div style="text-align:justify; padding:3px; margin-top:3px; margin-bottom:5px;">{short-story}</div> <div style="float: right;">[com-link]{comments-num} Comments[/com-link]</div> <div><em>Posted on {date} by {author}</em></div></div> HTML; $template_comment = <<<HTML <div> by <strong>{author}</strong> @ {date}</div> <div style="padding-top:2px;padding-bottom:10px;">{comment}</div> HTML; $template_form = <<<HTML <table border="0" width="493" cellspacing="0" cellpadding="0"> <tr> <td width="64" height="30"><div align="left">Name:</div></td> <td height="30"> <input type="text" name="name" value="<?php echo $_SESSION['userName']; ?>" disabled /> </tr> <tr> <td width="64" height="30"></td> <td height="30"> <textarea cols="40" rows="2" id=commentsbox name="comments"></textarea> <br /></td> </tr> <tr> <td></td> <td height="30"><input type="submit" name="submit" value="Add My Comment" /></td> </tr> </table> HTML; $template_prev_next = <<<HTML <p align="center">[prev-link]<< Previous[/prev-link] {pages} [next-link]Next >>[/next-link]</p> HTML; $template_comments_prev_next = <<<HTML <p align="center">[prev-link]<< Older[/prev-link] ({pages}) [next-link]Newest >>[/next-link]</p> HTML; ?> ANOTHER side note. I used the same code in the index.php and it worked like a charm. However, once I put it in the default.tpl file I got the error. I appreciate your quick response. Thanks for the help!
  8. Hi I'm a very big newb to PHP so if you tolerate my utterly retarded questions, I thank you very much! Here is a form, very basic. What it does it just allow you to type your name and comment and then post it. $template_form = <<<HTML <table border="0" width="493" cellspacing="0" cellpadding="0"> <tr> <td width="64" height="30"><div align="left">Name:</div></td> <td height="30"> <input type='text' name='name'> </td> </tr> <tr> <td width="64" height="30"></td> <td height="30"> <textarea cols="40" rows="2" id=commentsbox name="comments"></textarea> <br /></td> </tr> <tr> <td></td> <td height="30"><input type="submit" name="submit" value="Add My Comment" /></td> </tr> </table> HTML; Now for "<input type='text' name='name'>" I would like it not be editable. Here's what I would like: If a user is logged in if ((!isset($_SESSION['validUser'])) || ($_SESSION['validUser'] != true)) Then their username $username Will be the value for the "<input type='text' name='name'>". Otherwise the value would be 'guest'. If you need clarification, please post! Here is the webpage: http://tobysplayground.100webspace.net/Phat%20Cat%20Productions/index.php Thanks in advance!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.