-
Posts
557 -
Joined
-
Last visited
Never
Everything posted by unidox
-
What I am trying to do is replace all & with & but only if its in a <a> tag.
-
Why do you need those?
-
$accountid = $row->accountID; echo "<p class="account">" . $accountid_standard . "</p>";
-
I am trying to figure on how to do this: What I need to do is search for <a href></a> tags, but only replace & inside the href="" and leave the rest. See, the problem is I am merging php and html together, then using eval() to put it all together, I tried to use htmlspecialchars but it replaces some the of the php code. Any ideas? Thanks
-
I am using this code: <?php $q = mysql_query("SELECT * FROM `table`"); $r = mysq_fetch_array($q); $r = array_rand($r); echo $r['column']; ?> But that doesnt work. What I am trying to do, is select a random row from the db, then I can display the columns. How would I do that? Thanks
-
I have a working file upload for images, just I would like to know how I would go about checking the width and length of the image, in order to constrain proportions. Thanks
-
make sure that it checks the get entry to see if the file exists, and then define something like this: index.php: <?php define("IN_SCRIPT", "1"); if (!file_exists("inc/" . $_GET['page'] . ".php") { echo "Error, page does not exist."; die(); } ?> page thats included: <?php if (!IN_SCRIPT) { } else { code here } ?>
-
Getting: Could not execute query! when I try to add a site.
-
http://www.everkleen.biz/resort/literes/index.php?page=[] Warning: include(inc/[].php) [function.include]: failed to open stream: No such file or directory in /home/content/e/v/e/everkleen/html/resort/literes/index.php on line 42 Warning: include() [function.include]: Failed opening 'inc/[].php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/e/v/e/everkleen/html/resort/literes/index.php on line 42 http://www.everkleen.biz/resort/literes/inc/add.php Warning: include(inc/dbconnect.php) [function.include]: failed to open stream: No such file or directory in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 2 Warning: include() [function.include]: Failed opening 'inc/dbconnect.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 2 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 3 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 3 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 4 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 4 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 5 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 5 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 6 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 6 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 7 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 7 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 8 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 8 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 9 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 9 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 10 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 10 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 11 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 11 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 12 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 12 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 13 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 13 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 13 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 13 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 13 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 13 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 14 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 14 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 14 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 14 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 14 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 14 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 15 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 15 Return To Main Page Warning: include(inc/addform.php) [function.include]: failed to open stream: No such file or directory in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 20 Warning: include() [function.include]: Failed opening 'inc/addform.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/e/v/e/everkleen/html/resort/literes/inc/add.php on line 20
-
Can I ask why your using $_REQUEST? Maybe register_globals is off, use $_POST or $_GET.
-
I have this code that updates the php site depending on whats in the sql. $tpl = file_get_contents("templates/" . $name . "/index.php"); $index = file_get_contents("pages/news.inc.php"); $site = get_tag("url", "templates/stk/", $tpl); $site = get_tag("content", $index, $site); file_put_contents("templates/" . $name . "/index.php", $site); include("templates/" . $name . "/index.php"); The only problem is, how do I make it so instead of updating the file, I can just print out the data. I tried using echo $site, but the php gets blocked out for some reason. Here is news.inc.php: <div id="center_head"> <div id="center_head_txt">News</div> </div> <?php $q2 = mysql_query("SELECT * FROM `pcp_news`") or die(mysql_error()); $limit = TABLE_LIMIT; if (!isset($_GET['g']) || (!is_numeric($_GET['g']))) { $group = 1; } else { $group = $_GET['g']; } $start = (($group * $limit) - $limit); $q = mysql_query("SELECT * FROM `pcp_news` ORDER BY `date` DESC LIMIT $start, $limit") or die(mysql_error()); $rows = mysql_num_rows($q2); $total_pages = ceil($rows / $limit); if (mysql_num_rows($q2) == 0) { echo "There are not any news posts!"; } else { while ($r = mysql_fetch_array($q)) { ?> <div id="center_title"> <div id="center_title_txt"> <div id="center_title_txt_title">Title: <?=$r['topic']?></div> <div id="center_title_txt_date">Posted By: <?=$r['author']?> on <?=$r['date']?></div> </div> </div> <div id="center_body"> <div id="center_body_txt"><?=$r['message']?></div> </div> <? } } ?> and the template has delimiters like {content} stuff like that.
-
Can I ask what you use to scan?
-
Its for a template, then the user who codes the template can set variables.
-
Talking to my hosting company now to fix this.
-
I just finished the backend of the CMS to come. I am working on the template engine, and should have the front end in a few days. Please, I want all tips, feedback, I dont care how flammable it is, I want to make this better. Please try all normal stuff such as XSS, SQL Injection, ect I will be releasing beta once I finish the front end, so enjoy! www.pure-cp.com/beta/admin User: demo Pass: demo Thanks
-
How would I go about deleting all files inside a directory, and then deleting the directory. Thanks
-
Just an update, It works fine in IE7, just not in ff.
-
I am trying to make my website css and divs only. The problem is, my floats are messed up. I have 5 columns, left | spacer1 | content | spacer2 | right left, spacer1, content, spacer2 all have float: left, and right has float: right. This is my html: <div id="left"></div> <div id="sep_left"></div> <div id="center"></div> <div id="sep_right"></div> <div id="right"></div> When I view the site, it shows like this: left | content | spacer1 | spacer2 | right Whats wrong? Thanks
-
I have this code: function get_tag_inside($content, $tag) { $content = preg_replace("@\{" . $tag . "\}(.+)\{\/" . $tag . "\}@i", "$1", $content); return $content; } function get_tag($tag, $replace, $tpl) { $replace = preg_replace("@\{" . $tag . "\}@", $replace, $tpl); return $replace; } $index = file_get_contents("pages/news.inc.php"); $site = get_tag("content", "body", $index); $site = get_tag_inside($site, "title"); echo $site; But the problem is, I dont want to replace the title, I just want to turn it into a variable and/or const. I am trying to get all the info inside the {title}{/title} tags.
-
I made this function, seems to work. How is it? function get_info($tag, $content) { $content = preg_replace("@\{" . $tag . "\}(.+?)\{\/" . $tag . "\}@", "" . $tag . " = $1", $content); return $content; }
-
I was wondering how I would go about doing something like this: {title}lala{/title} Thats what smarty uses, and I was wondering how I can do the same thing using php + regex. I know how to replace the {title}{/title} with <title></title>, but I just dont know how I can retrieve lala, or a string inside a specified tag. Thanks
-
I looked at the php function ereg, but I still dont get how I would find the title.
-
Can we also see index.php, I think there might be a loop.
-
I was wondering how I would go about doing something like this: {title}lala{/title} Thats what smarty uses, and I was wondering how I can do the same thing using php, a function that gets the info inside a tag. Thanks