Jump to content

WebStyles

Members
  • Posts

    1,216
  • Joined

  • Last visited

Everything posted by WebStyles

  1. there's a forum here dedicated to freelancers. Post your ad there and you'll get loads of people willing to do the job.
  2. like I said 2 days ago: If you're not a coder, maybe you should hire one to fix things for you before they get out of hand.
  3. you mean you changed the backslashes to forward slashes
  4. if this works: file_exists('../lib/menu.xml') and this doesn't: simplexml_load_file("..\lib\menu.xml") I would try changing the backslashes to forward slashes. (I'm guessing your machine at home is Windows based, and the server is Linux)
  5. I answered that in my previous post. check out the code I posted.
  6. if($row_detail['des1']==".."){ ..... you're using 3 different variables names, I assume it's a typo ? but you actually have them all over the place. $row_detail, $row_detailis, $row_details (which one is correct ?)
  7. So... you tried it once, and it worked... you tried it a second time and it failed... ... What did you change between the first and second attempts?
  8. Would you like us to guess, or can we see the actual code? this error seems quite straight forward: "(...)in /home/ogwareco/public_html/menu.php on line 2" Guess 1: Whatever is on line 2 of menu.php (probably an include or require ) is pointing to a file that you did not upload, or is in the wrong place.
  9. I Agree with Jumpy09. this: (line 16 of your file) define('JPATH_BASE', dirname(/home/users/web/b195555/jpg.atlanticdrivingschoo) ); should be : define('JPATH_BASE', dirname("/home/users/web/b195555/jpg.atlanticdrivingschoo") ); P.S. are you really coding in MS Word ?
  10. this: $stmt = $dbh->prepare("INSERT INTO mypictures (pic_type , picture, pic_size, pic_name, pic_desc, sixval) VALUES (? ,?, ?, ?, ?, ?)"); is obviously incomplete. you need to put in your variables instead of the question marks.
  11. well, I got all that from your previous little bit of code, my question was simple: I just wanted to know if the article title is what you also want to use as a page title... I'll assume it is. Since you're grabbing the articles from the database and creating links to them, you could just add the title to the links, so instead of: echo '<a href="index.php?proc='.$row['id'].'">'.$row['article_title']. '</a>' . "<br />" . substr($row['article'], 0, 250). '...' ; you would have: echo '<a href="index.php?proc='.$row['id'].'&title='.$row['article_title'].'">'.$row['article_title']. '</a>' . "<br />" . substr($row['article'], 0, 250). '...' ; and then all you need to do is: <title> <?php echo isset($_GET['title']) ? $_GET['title'] : 'YOUR DEFAULT TITLE HERE'; // for when no article is selected ?> </title>
  12. and is $row['article_title'] what you want to use as the page title when the link is accessed?
  13. try something like this: $rt=mysql_query("YOUR DATABSE QUERY HERE"); while($dr = mysql_fetch_array($rt)){ echo '<a href="script.php?event='.$dr['event_name'].'&town='.$postLoc.'">'.$dr['event_name'].'</a><br>'; } P.S. where does $postLoc come from ?
  14. you could have an array in your session (or somewhere else, external file, included in index, etc...) that translates page names to page titles. then on each load, you just check the page name, and grab the appropriate title. how are you linking from page to page? (since you're including page1.php in index, i assume you've got a structure like: <a href = "index.php?page=page1"> ??
  15. anyway you look at it, you will need to define the page title BEFORE your <title> tags.
  16. you're including the header.php twice, once in index, and then again in page1. remove from index. (since page1 is where you have the variable with the actual title)
  17. Several issues here, I'll post a few: 1. why is this duplicated? if( isset($_POST['username']) && isset($_POST['username']) ) 2. mysql_escape_string is depricated. 3. while($row = mysql_fetch_assoc) has no query associated to it. 4. if($edie = 1&&$dbVN=0) should be if($edie == 1 && $dbVN == 0)
  18. what else did it say? you have so many echo's in there, if the file was uploaded, it must have echoed something else.
  19. when you create the cart: //RUN IF THE CART IS EMPTY OR NOT SET $_SESSION["cart_array"] = array(1 => array("item id" => $pid, "quantity" => 1)); you're using 'item id', but then you want to see it, you add an underscore: 'item_id'... that's why it says your variable is not defined. you're using the wrong name.
  20. Again? This question has been answered for you in your previous post. Put up some echoes to find out where your problem is: echo $file['image']['type']; what's the result ?
  21. just grab the variable from the database, the same way you grab the other info and check it before redirecting: (I would store it in a session variable to use later.) if($info['Admin'] == 1){ // redirect to admin page }else{ // redirect somewhere else }
  22. I guess the whole point here (of the original post) was passing a variable to the next page without it being in plain sight ( ? ). If so, you can simply store it in a $_SESSION variable and retrieve it on the next page. If you want it to look cool and encrypted, you can use your md5 hash as a session variable name: If they're links you wish to send out in emails, that are supposed to be unique, you can do the same thing, but store the hashes and values in a database instead of session. <?php session_start(); $link = md5($random); // I'm not sure on how md5 is setup that goes. $_SESSION[$link] = $random; echo "<a href='random.php?xyz=$link'>Click here yo!</a>"; ?> on next page, you can retrieve the value of $random with: <?php session_start(); echo $_SESSION[$_GET['xyz']]; ?>
  23. you could do this: $name = str_replace(" s","'s",$_GET['name']); so only spaces followed by an 's' get replaced. Not brilliant, but it will work in your case.
  24. well, that's it... (when the value in the text file is 0, the cron job won't execute, when the value is 1, it will. you can use the 2 last scripts to enable and disable the cron job whenever needed.)
×
×
  • 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.