Jump to content

jasonwisdom

New Members
  • Posts

    7
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

jasonwisdom's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi everybody! I am building a custom PHP app, and am submitting a form. This form will have between 1 or more textareas, named "textarea1", "textarea2", "textarea200", and so on. I need to read each of these and insert them into a database. How can I script this into the PHP landing page? Is there a way to read all of the values, and names, that are contained in $_POST. Many thanks, Jason
  2. You BOTH are fast. Thank you!! I will play with both, a little later - other things are coming up. Thanks again. Jason
  3. Hi, I am coding a website.. where users type in a message, and it displays for the public. Standard PHP 5.2.5. When the text contains a hyperlink, I want to wrap an <a href="link"> </a> around it. How do I detect such a thing....is there a regular expression I can use? Thanks for saving me time. Jason
  4. This code is extremely stripped down....... class User { public $userid; public $access; function __construct() { $this->ResetValues(); } private function ResetValues() { $this->userid = 0; $this->access=$this->InitAccess(); } private function InitAccess() { $access = new UserAccess(); return $access; } public function LoadUser($userid, $mysqli) { echo "Now in load user.<br>"; $this->userid=$userid; $this->access->LoadAccess($userid,$mysqli); } } class UserAccess { public $hasuser; function __construct() { $this->hasuser=0; } public function LoadAccess($userid, $mysqli) { echo "Now in load access.<br>"; $sql="CALL spSelectUserAccess(".$userid.")"; if ($mysqli->multi_query($sql)) { echo "Now in SQL loop.<br>"; if($result = $mysqli->store_result()) { while($row = $result->fetch_array(MYSQLI_ASSOC)) { if($row['access']=="User") {$this->hasuser=1;} } } } } } When I run this..... I see "Now in load user." I see "Now in load access." I do not see "Now in SQL loop." Any ideas? Hope this is clear. Jason
  5. Can PHP pass an object to a class method? I have a $mysqli object, representing the mysqli DB class of course. I am replacing mysql_pconnect() which used to exist at the top of every page. My classes just used the mysql_query() methods and similar....I want/need to replace these with $mysqli->multi_query(). But when I simply use $mysqli->multi_query(), I get an error. Fair enough...so I pass "$mysqli" as a parameter to the public methods. Now I don't get an error, but no actual results get returned. Any thoughts? Let me know if you want me to clarify. Thanks a bunch, Jason
×
×
  • 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.