Jump to content

DeanWhitehouse

Members
  • Posts

    2,527
  • Joined

  • Last visited

Everything posted by DeanWhitehouse

  1. how would i do this?? I have seen that site's mention converting them to flash, any one know any good tutorials or codes, I will be uploading the videos throught an input form on the site, so i will need to convert into flash?
  2. i done a much simiplar way, i just have <img src="<?php echo $(image_link ?>" width="200px" /> this makes a kindoff thumbnail, i have this inside the link and this is a much simiplar, file efficent and flexible way of doing it
  3. i get this error Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/www/darkflame.awardspace.com/guestbook.php on line 40 $ban_ip = mysql_query("SELECT * FROM darkflame_ban WHERE `ip`=$ip LIMIT 0,1"); $ban = mysql_fetch_assoc($ban_ip); if ($ban) line 40 $ban = mysql_fetch....
  4. my IP ban isn't working , what have i done wrong? <?php $ip = $_SERVER['REMOTE_ADDR']; $ban_ip = mysql_query("SELECT * FROM darkflame_ban WHERE `ip` LIMIT 0,1"); $ban = mysql_fetch_assoc($ban_ip); if ($ip == $ban) ?> this is the bit to check if it is banned
  5. ok, thanks i am now stuck with this <?php if($_SESSION['lang_ru'] == true) { ?> <a href="?lang=en">English</a> <?php } if($_SESSION['lang_en'] == true) { ?> <a href="?lang=ru">Russian</a> <?php } else { ?> <a href="?lang=ru">Russian</a> <?php } ?> When you select a lanuage you still see the else option
  6. how can i destroy a specific session e.g. $_session['cake'] session_destroy($_session['cake']); will that work?
  7. this is my code, i need to insert two textarea's into two different tables, but with one submit button, this is so i can insert two different languages into my database for news. But i am getting mysql syntax errors <?php require_once 'nav_bar.php'; $time_stamp = date("d.m.Y"); $date = $time_stamp; if ($_SESSION['dark_flame'] == true) { if(isset($_POST['submit'])) { $newname = mysql_real_escape_string($_POST['newname']); $newcontent = mysql_real_escape_string($_POST['newcontent']); $runame = mysql_real_escape_string($_POST['ru_name']); $rucont = mysql_real_escape_string($_POST['ru_content']); if ($newname && $newcontent ) { mysql_query("INSERT INTO `darkflame_news` AND `darkflame_news_ru` (id, name, content, time) VALUES( '','$newname','$newcontent', '$date') AND (id, name, content, time) VALUES( '','$runame','$rucontent', '$date')") or die('Error ' . mysql_error()); echo "News Saved"; } else { echo "Please Fill In All The Fields"; } } ?> <form action="<?php $_SERVER['PHP_SELF'] ?>" method="POST">News Name: <input type="text" name="newname" /><br />News Content:<textarea name="newcontent" cols="30" rows="10" title="Edit Site Content"></textarea><br /> RU News Name: <input type="text" name="ru_name" /><br />RU News Content:<textarea name="ru_content" cols="30" rows="10" title="Edit Site Content"></textarea> <br /> <input type="submit" value="Submit" name="submit" /> </form> <?php } ?>
  8. The user enters the news, it then posts to a database, it then is displayed through a loop on the main page. but, i need to change the /n to <br > how ??
  9. how do i convert, preg_replace?? If os can someone show me the code?
  10. well, when i enter stuff into a textarea, and decide to start a new line, it is displayed all on one line , i want it so that when i start a new line, it inputs this new line
  11. how can i detect when a user starts a new line in an input form, textarea, i was thinking, doing strlength and then doing a wordwrap, with the strlength. Not the best idea, any others?
  12. put ob_start(); at the begging of the page
  13. so the only way would be to have all the data twice, but in different languages, I still don't see why i can't just do preg_replace and put the english alphabet in there and replace it with the russian one
  14. can someone tell me if this is what i need for my site?? to change language,using data from a database, as i don't understand it all.
  15. yer, thats fine i already have someone to do that, will this effect what is entered into the database? but , now that i think about it the database content is in english , so i will need two tables (identical) but one with russian content and one with english
  16. ok, what about this then, two files ,one called eng.php and rus.php each file contains the variables for the page but in different languages, e.g. eng.php $pagecontent = "content"; rus.php $pagecontent = "rusian_for_content"; and on the page this is echoed, echo "$pagecontent"; i could just have an if for the require_once code yer??
  17. so i could not just do , preg_replace(or something similar) at the start of the page, and then have it set so that if they click the language button it changes all the english alphabet to another alphabet??
  18. i have made this code to check what page you are on and depending on the page, show a link or not <?php if($_SERVER['HTTP_HOST'] == "http://darkflame.awardspace.com/") { if($_SERVER['REQUEST_URI'] == "/index.php") { echo "Main"; } } else { echo '<a href="index.php">Main</a>'; } ?> but the first if , isn't working and it is displaying a link any ideas, on how to fix this
  19. well the whole page (near enough) is displayed from the database , using variables
  20. i just, need it so that the site is translated to another language if the viewer selects it. For example i will have a link and they can click it to change the site into there russian, and then they can click it to change it to english , i will use sessions to save this change for them, and i am going to have the link dynamic. e.g. ?lang=eng when did i mention CMS??
×
×
  • 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.