Jump to content

pro_se

Members
  • Posts

    131
  • Joined

  • Last visited

Everything posted by pro_se

  1. Hello all, I have not posted here in a while... I keep getting this error: Parse error: syntax error, unexpected ',' in /home/*hidden*/*from*/*you*/includes/functions_base.inc.php on line 843 with this code... [code] <?php function int2folderperm ($int) {   $int & FOLDER_FRIEND_ACCESS;   $int & FOLDER_FAMILY_ACCESS; return array ('friend' => (int), 'family' => (int));  //line 843   } ?> [/code] any suggestions?
  2. I am writing a code that will read a user input and flip the text around. I have the code made so if you have a space it will reverse it but i want it if you input: 'car' it will say 'rac'... any help will be appreciated! [code] <?php if (isset ($_POST["flip"])) {                  $text = $_POST['text']; $brokenup = explode(" ", $text); echo $brokenup[1]; echo $brokenup[0]; } ?> [/code]
  3. you could make it so that every post they make updates the time on an sql database and if the time is < 5 min then it will not display them... i did that for my fake myspace project and it worked out great!
  4. so how would i make it so that it will only make the one that is clicked turn red?
  5. That still does not work! Ahh... This is so annoying! ...anyone else with comments?
  6. Hey all! I have not been active in this community for a while (school started)... Anyways, I ran into a problem when I was creating a project for a friend and this is the problem: I want to be able to click somthing (a text button, in this case) and make the buttons class change to active. I'm sure that all of you have seen those web2.0 templates where someone clicks a button and the button becomes active without reloading the page, that is what I am attempting. I am posting the code... [u][b]javascript.js[/b][/u] [code]function MakeActive() { var NAME = getElementById("maintabs") document.NAME.className="active" }[/code] [u][b]index.html[/b][/u] [code]<div class="bar"> <ul id="maintabs" class="SearchSelect"> <li class="slogan">Search Categories:</li> <li id="1" class="active"><a href="#" onclick="MakeActive();">Bands</a></li> <li id="2"><a href="#" onclick="MakeActive();">Artists</a></li> <li id="3"><a href="#" onclick="MakeActive();">Music</a></li> <li id="4"><a href="#" onclick="MakeActive();">Pictures</a></li> <li id="5"><a href="#" onclick="MakeActive();">Gigs</a></li> </ul> </div>[/code] Thanks for all your help!  You guys are always great!!!
  7. i want to know how to do this too... the tutorial is too complex and on too many pages... i want it quick and easy...
  8. waiiitt... i got it... this works perfect... i sould actually look at the manual before i post... lol.... thanks for the input tho...[code]$string = 'The quick brown fox jumped over the lazy dog.'; $patterns[0] = '/quick/'; $patterns[1] = '/brown/'; $patterns[2] = '/fox/'; $replacements[2] = 'bear'; $replacements[1] = 'black'; $replacements[0] = 'slow'; echo preg_replace($patterns, $replacements, $string);[/code]
  9. or can u tell me the format for the "  ("/[<\?php]{6}(.*?)[\?>]{3}/i", "stuff
  10. can u bold what is going to be searched? plz...
  11. well... i have a about me section on my cms and i dont want people putting in php scripts and having them parse... if you have a good way to do this that would be cool...
  12. Hello... You know in Myspace when you attempt to put a coldfusion string into an about me page -- it does not parse the coldfusion or does not insert the full code into the database? How can i  do that with php? just taking out '[b]<?php[/b]' and replacing it with '[b]...[/b]'?
  13. it does not display correctly...
  14. but i want a radio button instead...
  15. can u give me and example of what that may look like? this is what i am currently using (ghetto status): [code]<input name="showgeneral" type="text" id="showgeneral" value="<?php $username = $_SESSION['username']; $result = mysql_query("SELECT * FROM users WHERE username='$username'"); while($r=mysql_fetch_array($result)) {   $showgeneral=$r["showgeneral"];   echo "$showgeneral"; } ?>" size="2" maxlength="1"> [/code]
  16. wow... maybe it could use ajax... anyone?
  17. Hey All! I am having a problem with using radio buttons to change an integer in a mysql database... The values they need to have are 'y' and 'n'. And when someone opens a page it gets the information from the database and it sets the default selection for the radio button as what is in the database (y or n). any suggestions?
  18. im sure i did... i will check..
  19. $rows2 = mysql_num_rows($result2);
  20. still says: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/userhome.php on line 163
  21. hey guys! i have a query to see if a certain user has messages... it is not working right... here it is: [code]<?php   $username = $_SESSION['username'];   $new = 'new'; $sql_query2 = "SELECT * FROM messages WHERE toname='$username' and read='$new'"; $result2 = mysql_query($sql_query2); $rows2 = mysql_num_rows($result2); if ($rows2==0) { echo ''; } else { echo "<span style=color:#0000FF; background-color:#BED5E7><strong><a href=messagecenter.php>You have a new message!</a></strong></span><br>";} ?>[/code] it gives me a supplied argument error? it would be cool if you'd help!
  22. hey maan! i did some serious deep meditation... lol... i used the first code u gave me and modified to with an if and else and changed the time diff to 5 min and $username = $_SESSION... and guess what! it worked!!!!!! solved.
  23. Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 10 in /var/www/dev.php on line 31 31: $mem = mysql_result($mem, 0);
×
×
  • 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.