Jump to content

jeremyphphaven

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Contact Methods

  • AIM
    jeremyrileyaf
  • MSN
    heeroeyuy@hotmail.com
  • Website URL
    http://www.phphaven.com

Profile Information

  • Gender
    Male
  • Location
    PDX

jeremyphphaven's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. sql below to do both delete from table_name alter table table_name auto_increment=1
  2. so dood, peep this. VERY FIRST THING to put into your serving php file... <?php set_magic_quotes_runtime(0); Line 1 and line 2... do this in all your php files on YOUR server... it turns off the server auto-adding the slashes upon http posting. Then you won't have to worry about using stripslashes(). addslashes() are necessary before storing into a database... that's the only time I've ever used it.
  3. may I ask why you're buffering the output? I didn't really dive into it that much after noticing you're buffering the output. If not used correctly, that will cause a shiz load of probs. This is how I suggest your re-do your inline PHP if removing the output buffering doesn't work or is not the problem. <?php // SESSION LOGIC // INCLUDE / STARTUP LOGIC // CODE/MYSQL LOGIC, CODE STORED IN OUTPUT VARIABLE(S) ?> <!-- HTML CODE START --> OUTPUT PHP VARIABLE(S) <!-- HTML CODE END --> <?PHP // FUNCTIONS USED IN CODE LOGIC ?>
  4. using the wrong MYSQL function. Use date_add or date_sub and you can specify how you get it returned to you... See specifics here - http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_datediff
  5. read the whole directory into an session array once (check for it to make sure you don't keep doing it). Then create a page variable that gets sent based on where you are Then pick up the page variable and depending on where what page you are on, you'll get served up the correct files. let me know if you need a quick example... hoping that just suggesting to you to put the thing in an array and use a page number system will suffice.
  6. require(); lol, just kidding. Seriously though, I think the question is, how do you tell when you'll be using PHP or not? If that's possible you can use javascript / ajax to complete, but I may not be understanding the problem.
  7. put your code so we can see what you have... need to see if this is in code, or sql statement, where is the prob bob? =O)
  8. You should just look for if(isset($_REQUEST['submit']))
  9. I've never used either editor, but try taking out the first echo... the second one, should have javascript create the textarea for you? // echo "</td><td><textarea name='NewDescription' id='NewDescription' cols='40' rows='15' style='width:100%; height:50px'></textarea>\n"; echo "</td><td><script language='JavaScript' type='text/javascript'>generate_wysiwyg('NewDescription');</script></td></tr>\n";
  10. IMO it's a matter of preference. I code as your buddy referenced, but like you said, your code works just as well. Having said that, there are certain coding standards overall that you may want to research for PHP
  11. sorry, crossed languages... use escape() in the javascript, not urlencode() echo "<script type='text/javascript'> function popupChat(nick) { win=window.open('chat/chat2.php?nick='+escape(nick), 'WebChat', 'height=420,width=660'); }</script>";
  12. Yo dood, you need a book or tutorial or something bro... =O) My bible (I still buy new versions as they come out to learn new tricks and it's fast and easy for beginners) is this book: GOOD STUFF
  13. Are we sure this will work with the version of you are using? I'm have mad problems with regex on older PHP versions. There is a great changelog for the functionality on the PHP.net site, but it's hard to find, and I didn't bookmark it. So search around on the php.net site for the changelog if that regex code doesn't work on your version of php, they usually have suggestions
  14. totally confused. didn't you just build the array? lol <?php $array = array(); // MYSQL DATABASE LOOP FUNCTIONALITY (assuming you're using MYSQL) while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { array_push($array,$row['id'] => array([item] => $row['item'], [result] => $row['result'])); } ?> Just to note, I didn't test this and just wrote it out here, so may need tweaking but should work just fine.
×
×
  • 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.