Jump to content

sKunKbad

Members
  • Posts

    1,832
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by sKunKbad

  1. First it's really bad to have an image named "banner". Try looking at your site on a computer that has ad blocking (ie. Norton Internet Security), and you won't see that image. Anyways, just add: height:185px; to #banner
  2. If PEAR is a must, you might change hosts to one that offers PEAR, like inmotionhosting.com. This is the host that I am currently using, and they are the best that I have worked with so far. I'm not going to say they are perfect, because no host is, but so far so good for me.
  3. PEAR on a shared host is a real headache! I've felt the pain from my own experience, and at least with my host, I would not attempt it again. At least in my experience, I was not able to install PEAR correctly, and had to have the host do it. Installation is not hard, but I believe you need special priveledges, like sudo/admin.
  4. Try: $pos = stristr($cat,$choosecat); if ($pos == false)
  5. sKunKbad

    IE

    Not enough info. We need to see more of the html that you are styling.
  6. Somebody must have access to the core files that make up the CMS. It sounds like you need to go have a talk with them, so that you can alter the code.
  7. assuming you only have two columns in your row: $new_array = array(); $row = mysql_fetch_array($result) while ($row = mysql_fetch_array($result, MYSQL_NUM)) { $new_array["$row[0]"] => $row[1]; } // returns the array of all users by Multi Dimensional Array return $new_array;
  8. You've got to show us your code before we can tell you why you are having problems.
  9. Try statcounter.com
  10. I think this: http://www.w3schools.com/xsl/xsl_languages.asp might be what you are looking for.
  11. I think this HTML Help forum is the wrong place to ask this question.
  12. It would be a lot easier if you just coded it in standard XHTML / HTML. If you want to have all of the data in XML form, your going to have to parse it and put it in HTML output anyways...
  13. http://www.joe2torials.com/css/examples/horizontal_and_vertical_centering_example.html
  14. You might try enclosing the $var portion of $_SESSION["error_$var"] with brackets, like: $_SESSION["error_{$var}"] or do something like: $_SESSION["'error_' . $var"]
  15. If you need to check if javascript is enabled or disabled, simply try to set a cookie in javascript, and then have php check if it exists or not. This obviously can't be done at once, but I do this on sites. Page 1 : Try to set the cookie using javascript. Page 2 : Check for the cookie that javascript tried to set using php. If php knows that javascript is on or not, php can set a seperate cookie that lets it know on any page to output javascript or noscript alternative stuff.
  16. if you want to parse the css file as php, then you need to make it a php file, and make sure you use the appropriate header Content-Type = text/css.
  17. Think about this: Some image files that are altered can run malicious scripts on your server, or on the computers of your users. I won't explain how it is done, but I have done it myself for testing purposes, and it is not hard to do. Your average 13 yr old with a lot of time on his/her hands knows all about it. Before you "randomly" show user uploaded photos on your site, you may want to consider that fact. It doesn't take a real genius to see that allowing user uploads of anything is a security vulnerability, and if you don't have enough experience to write your own random image generator, then you probably need to stop now and read more before going forward with this. That said, a person named sasa on this forum once helped me with a random text generator, and with a little work you could make it work for you. <?php session_start(); $a_text_files = array( 'file_a.txt', 'file_b.txt' , 'file_c.txt', 'file_d.txt', 'file_e.txt' ); if (!array_key_exists('rand_text_files', $_SESSION)) $_SESSION['rand_text_files'] = $a_text_files; if (count($_SESSION['rand_text_files']) == 0) $_SESSION['rand_text_files'] = $a_text_files; shuffle($_SESSION['rand_text_files']); $rand_text = $_SESSION['rand_text_files'][0]; unset($_SESSION['rand_text_files'][0]); $handle = file($rand_text); foreach ($handle as $line_num => $line) { echo $line; } ?> Thanks again sasa!
  18. <?php phpinfo(); ?>
  19. You can write the script for the other forums on the forum.php page, and access it by using get or post vars. You will probably need to use get vars with mod_rewrite to achieve the look that you are on a different page.
  20. Considering the information given to us, there's no way to know what the OP wanted specifically. I was assuming that the key value pairs would all be inserted into a single database field (which I still believe is what was wanted???).
  21. Of course it works exactly how you programmed it. When the submitted values are posted back to the script, you are applying the values of test and test1 to variables, but that doesn't mean that they are in the post array. They finally make it to the post array when you submit the second time, because they were values in the form only on the second submission. Try this: <?php if(isset($_POST['sub'])){ $ss=$_POST['test']; $_POST['first']=$_POST['test']; $ss1=$_POST['test1']; $_POST['second']=$_POST['test1']; echo '<pre>'; print_r($_POST); echo '</pre>'; } ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="form1"> <input type="hidden" name="first" value="<?php echo $ss; ?>" /> <input type="hidden" name="second" value="<?php echo $ss1; ?> " /> <br /><br /> <input type="text" name="test" value="" /> <input type="text" name="test1" value="" /> <br /><br /> <input type="submit" name="sub" value="login" /> </form>
  22. $val=''; foreach($_POST['checkboxes'] as $key=>$val) { $data = $key . "," . $val . ","; } $qry = mysql_query("INSERT INTO fake ('data') VALUES ($data)") or die(mysql_error()); Something like this would take all of the keys and associated values, and create a comma delimited string that is inserted into the fake table, in the data column.
  23. sKunKbad

    form

    What kind of server? you might remove the SMTP setting and see if the mail will send through sendmail.
  24. Do you mean that you want all of the key=>val pairs in one database row, or do you want all of the key=>value pairs on one line of HTML? Both?
  25. you will need to use fread instead of fwrite, and then just echo what was fread.
×
×
  • 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.