Jump to content

wannabephpdude

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

About wannabephpdude

  • Birthday 07/04/1970

Contact Methods

  • Website URL
    http://www.webxstudio.com

Profile Information

  • Gender
    Male
  • Location
    Dallas

wannabephpdude's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. objNoob, Thanks bro. I figured it out. Thanks to P2000 for moving this to the appropriate thread. Peace
  2. I have a table called 'intake'... I need every field in this table (23 fields). This table has a field named rec_id. The second table is named 'insurance'... I need only one field from it named 'claim_type'. 'intake.rec_id' = 'insurance.intake_id'... How can I join them with all the 'intake' field values available and add to it the one 'insurance.claim_type'? Thanks in advance... My join skills seem to be slipping
  3. Or... something like this for a bit more expandability. Overbleed, what this means is that you can set the maxLength for each use of this function. <?php function cut_str($maxLength,$string){ $suffix = '...'; $finalStr = ''; if(strlen($string) > $maxLength) { while($string{$maxLength} != ' '){ $finalStr .= $str{$maxLength}; $maxLength++; } return substr($string,0,$maxLength).$suffix; } else { return $string; } } $postTitle = 'This is my post title, just a filler really.'; echo cut_str(23,$postTitle); ?> Max length is now set to 23 and the result becomes => "This is my post title, just..." [edit] Nice code Paul ^5!
  4. You're looking for substr() my man. See the following: substr() <?php echo substr('abcdef', 0, 4); // abcd ?>
  5. Classic case of flat file database it seems with a slight twist... your separator will be a space. Have a look at the following: Flat File Databases also see this => explode() for making arrays.
  6. OldWest, an AJAX solution could be used here... which is a whole other animal. Try sending HTTP requests to the script itself via a form or a bit of javascript attached to a button and pass a $_GET var like such: <button name="clickMeButton" type="button" onclick="window.location='index.php?var=true'">Click Me!</button>
  7. I would definitely have a unique id for any table [Edit] when comes to storing users for sure. If you can work that out then the following will be helpful. Take a look at solution 2 as opposed to using rand() within your query.
  8. <?php if(!empty($page)) { include($page.".php"); } else { include("home.php"); } ?> If you wish to capture $GET vars be sure to clean them... Here's a bit of my code I use to clean up strings: // Clean all incoming strings function clean($string) { $k = trim($string); $k = htmlspecialchars($string); $k = mysql_real_escape_string($string); return $k; } You will need to call the database before you can use => mysql_real_escape_string($string); Good Luck - tony
  9. Try something like this... <?php if (empty($_POST['reg']) || empty($_POST['title'])) { $fillinform = "Please fill in all the form to add a listing."; // anything else you can think of here } else { // Then place your positive outcome here } ?> Good Luck - tony
  10. OK SA. I'm on it. One question though for future reference. Have you much experience using hash? I may ask you some more questions, if that's not a problem. Thanks :)
  11. Have you been able to get one catagory to display correctly? If so make a file to display each catagory. Then include() them into a master file. :)
  12. Perhaps you can build a file for each catagory (with your limits [25]) and use include() or require() for each. // cat 1 include('file1'); //cat 2 include('file2'); //cat 3 include('file3'); Just a thought...
  13. If the catagories just have to be separated, you may need to call a query for each. If not, sort by 'catagory' in your query. ;)
  14. I have written a [color=red]"login"[/color] system for one of my websites that works with a [color=green]MySQL[/color] database and a [color=orange]cookie[/color]. I would like to store the password in the MySQL database encrypted (via hash). I know phpBB does it using hash some how. Does anyone know of some tutorials I can read about HASH? Thanks in advance. PEACE.
×
×
  • 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.