Jump to content

Rosst

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Rosst's Achievements

Member

Member (2/5)

0

Reputation

  1. Rosst

    HELP!

    Ok, I'm not going to use that, but instead I am working on something else, a video website, like youtube, and well it's not working again, here are my codes. index.php: [code=php:0]<html> <head> <title>VideoPlayer</title> <link href="style.css" rel="stylesheet" type="text/css"> </head> <body> <div id="wrapper"> <div id="head">VideoPlayer</div> <br> <div id="main"> <?php include("main.php"); ?> </div> <div id="content"></div> </body> </html>[/code] main.php [code=php:0]<?php $conn = mysql_connect("localhost", "rosst", "*********************"); mysql_select_db("videos") or die(mysql_error()); if (@!$_GET['cat']) { $mysql = mysql_query("SELECT*FROM cats ORDER BY id DESC"); while ($m = mysql_fetch_array($mysql)) { echo "<a href=\"#\" onClick=\"ajaxFunction();\" id=\"cat\" value=\"".$m['id']."\">$m[name]</a><br />$m[desc]<hr />"; } } else { if (@!$_GET['video']) {%
  2. Ok what I want to do is submit a form which goes to a php file which generates a image which will then be displayed on the page with the form, I have tryed and it hasn't worked.
  3. I've deleted what I had so far because I thought that someone might have the codes to do it.
  4. Ok, there is this site, http://msig.info/web2.php and it makes site logos and when you make one (type in something in the field and press generate) there is a popup that shows you this stuff, and I want to know how to do that, I know it is in AJAX and PHP, I just need to know how to do it, thanks for the help!! This is the thread that I posted before I just didn't see this forum before, thanks for the help.
  5. Ok, there is this site, http://msig.info/web2.php and it makes site logos and when you make one (type in something in the field and press generate) there is a popup that shows you this stuff, and I want to know how to do that, I know it is in AJAX and PHP, I just need to know how to do it, thanks for the help!!
  6. Ok, well I am trying to make comments for my news system on my site.. And I am getting this error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/avexxon/public_html/blah/includes/news.php on line 49, and on line 49 is this code: $commentsnum = mysql_num_rows(mysql_query("select * from newscomments where news = '$_GET[id]' order by id asc limit $from, $max_results"));, you can see here: http://www.vexxon.net/blah/?view=news&act=comments&id=1, thanks in advance for any help
  7. http://vexxon.net/index.php?id=vthread&t=5 (It was a test for the bbcode) Check that out, you see that you get a error: Warning: Unexpected character in input: '' (ASCII=92) state=1 in /home/avexxon/public_html/includes/ubb.php on line 137, and line 137 is: function parse_php($tree)  {return '<div class="wrap"><div class="title">PHP Code</div><div class="content">'.nl2br(highlight_string(unhtmlentities(''.$tree->toText().'')), true).'</div></div>';} Don't say anything about unhtmlentities() it's a functions I made.
  8. It is in descending order right now, and it doesn't look like it should, none of you are helping me!
  9. I use the same thing, it doesn't work, except I have asc instead on desc [code=php:0]<?php include("config.php"); $a = mysql_query("select * from snake order by score asc limit 5"); while ($b = mysql_fetch_array($a)) { echo "<a href=\"index.php?id=memb&user=".$b[uname]."\">".$b[uname]."</a> - ".$b[score]."<br />"; } if ($logged[username]) { echo "Play snake: <a href=\"snake/snake.swf\">Link</a>"; } ?>[/code]
  10. I want to select the highest scores from a database, it's from a PHP/MySQL/Flash snake game, see here: http://vexxon.net/index.php? the bottom right content thingy has the snake high scores, but it's not in order, how would I put them in order? Thanks in advance for the help.
  11. Hmm, I need help again, see right now I am looking at one of the tutorials I posted on my site and I see [code=php:0] in it, but it shouldn't be there, and there is a gap at the top, does anyone know how to fix it? Sometimes it doesn't even highlight it... http://vexxon.net/index.php?id=tuts&cat=12&tutid=1 there it is, you can see, I am using the same code I posted before
  12. Hello, I have a small problem with my bbcode, I got it fixed here at php freaks, and I thought it was OK the way it was, what happens is when I use bbcode there are massive spaces between lines, and I need that to be fixed, example of what it looks like: http://vexxon.net/index.php?id=tuts&cat=PHP&tutid=1 example of what I want it to look like: http://dannyscripts.com/?view=tutorials&act=tutorial&id=101 And my code: [code]<? function bbcode($content) {     $bbcode = array(       "'\[b\](.*?)\[/b\]'",       "'\[i\](.*?)\[/i\]'",       "'\[u\](.*?)\[/u\]'",       "'\[code\](.+?)\[/code\]'",       "'\[url=(.*?)\](.*?)\[/url\]'",       "'\[url\](.*?)\[/url\]'",       "'\[img\](.*?)\[/img\]'",       "'\[red\](.*?)\[/red\]'",       "':\)'",       "':p'",       "':o'",       "':huh\?:'",       "':C'",       "':D'",       "':lol:'",       "':shades:'",       "':blink:'",       "':blush:'",       "'!!'",       "':check:'",     );     $html = array(         "<b>\\1</b>",         "<i>\\1</i>",         "<u>\\1</u>",         "<strong>Code:</strong><div style=\"margin:0px 10px;padding:5px;border:1px dotted #000000;width:80%;\"></em>\\1</em></div>",         "<a href=\"\\1\" target=\"_BLANK\">\\2</a>",         "<a href=\"\\1\" target=\"_BLANK\">\\1</a>",         "<img border=\"0\" src=\"\\1\">",         "<font color=\"#FF6600\">\\1</font>",         "<img src=\"includes/smileys/smile.gif\">",         "<img src=\"includes/smileys/tongue.gif\">",         "<img src=\"includes/smileys/ohmy.gif\">",         "<img src=\"includes/smileys/huh.gif\">",         "<img src=\"includes/smileys/angry.gif\">",         "<img src=\"includes/smileys/biggrin.gif\">",         "<img src=\"includes/smileys/laugh.gif\">",         "<img src=\"includes/smileys/cool.gif\">",         "<img src=\"includes/smileys/blink.gif\">",         "<img src=\"includes/smileys/blush.gif\">",         "<img src=\"includes/smileys/!!.gif\">",         "<img src=\"includes/smileys/check.gif\">",     );     $content = preg_replace($bbcode, $html, $content);     // call a dedicated function to highlight our php code.     $content = preg_replace_callback("#\[php\](.*?)\[\/php\]#is", 'highlight_php', $content);     return stripslashes(nl2br($content)); } function highlight_php($matches) {     $php = "<strong>PHP:</strong><div style=\"margin:0px 10px;padding:5px;border:1px dotted #000000;width:80%;\"></em>";     $php .= highlight_string($matches[0], true);     $php .= '</em></div>';     //strip out line breaks:     $php = str_replace("<br />", '', $php);     // strip out PHP BBCode tags:     $php = preg_replace("#(\[php\]|\[/php\])#i", "", $php);     return $php; } ?>[/code] Thanks to anyone who can help!
×
×
  • 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.