Jump to content

mewhocorrupts

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

About mewhocorrupts

  • Birthday 11/05/1984

Profile Information

  • Gender
    Male
  • Location
    Parker, CO

mewhocorrupts's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [quote author=hannah link=topic=111090.msg449931#msg449931 date=1160495442] So what am I doing wrong? I found some people use $query = "SELECT id FROM memtb WHERE (id='".$user."')"; somethin like that where you use periods I donno I tried doing that.. but then it doesn't update. [/quote] The periods in that string connect a literal string (the part within the quotes) and a PHP variable.  The final string would be as follows: [code] <?php ... $user = "MyName"; $query = "SELECT id FROM memtb WHERE (id='".$user."')"; echo $query; ... ?> [/code] Would output: [code] SELECT id FROM memtb WHERE (id='MyName') [/code] Now, for the problem that your having with your password change form, could you post the code in your changepass01.html?
  2. So I finally got some output.  When I print_r($_COOKIE);, it shows me all of the cookies on my system, which includes my "Test" cookie from above.  The thing is, it wont' let me access it with $_COOKIE['Test'].  Any ideas?
  3. Adding to the previous post, I'll assume (read as: hope) that you're using a *nix type OS for your server.  If you google your flavor along with the words "bluetooth daemon", a rather complete list of sites catering to your specific need will appear.  Admittedly, I didn't find much for Windows in the way of command lines apps, but then, I didn't look very hard in that area. I run Fedora Core 5, and found a site [url=http://www.mjmwired.net/resources/mjm-services-fc5.html]http://www.mjmwired.net/resources/mjm-services-fc5.html[/url], wherein hcid() and hidd() were explained. Because your question doesn't deal directly with native PHP features or modules, you may have to try a different part of the forums to get an answer.
  4. [quote author=cyprus link=topic=109587.msg441907#msg441907 date=1159295970] I have a series of checkboxes on a form/page. I use the code below which maintains there settings on page re submission. [code]<?         $products = array (         1 => 'Digital Betacam',         2 => 'Betacam SP',         3 => 'DVCPro',         4 => 'HDCAM',         5 => 'Mini DV'     );        foreach ($products as $id =>$prod) {         if ($_POST['product']) {             // was value of id in those posted?             $chk = in_array($id, $_POST['product']) ? 'checked' : '';         }         else $chk = ''; ?>        [/code] However, now I am using page pagination, the checkbox's lose there checked/unchecked status when paging. Any idea how I prevent this happening. Many thanks [/quote] I'm fairly certain that your issue might lie in how your referencing your $_POST items.  $_POST['product'] should be $_POST[$prod], shouldn't it?
  5. That's the thing, I don't get any output.  None at all.  At the very least, $carr_ser should output, but it doesn't.
  6. I'm having an issue with setcookie() and serialize()/unserialize(). Here's the code that works with setcookie(): [code] <?php setcookie("Test[1]", "test1"); setcookie("Test[2]", "test2"); setcookie("Test[3]", "test3"); if (isset($_COOKIE['Test'])) {   foreach($_COOKIE['Test'] as $k => $v)   {     echo "$k => $v <br>";   } } ?> [/code] That's fine, I get that.  The issue I'm having is that I want to try and serialize an array of user information, and then store it in a cookie.  The problem is that absolutely nothing happens.  Here's the code so far: [code] <?php $carr = array( "un" => "test", "up" => "pass", "li" => 1, "something" => "else" ); $carr_ser = serialize($carr); setcookie("SerCookie", $carr_ser); echo "$carr_ser <br>"; foreach($carr as $k => $v) {   echo "$k => $v <br>"; } $stored = $_COOKIE['SerCookie']; $stored_arr = unserialize($stored); foreach($stored_arr as $k => $v) {   echo "$k => $v <br>" } ?> [/code] I'm not sure what I've done wrong.  If the first round of code works, the second should be less likely to err.  I can't see errors because our server has error reporting turned off for some of the code that we have, particularly eval().  I can test some more when I get home tonight, but if I can hash it out now, I can make it to the bar in time to play poker.  ;D
  7. [quote author=HuggieBear link=topic=109432.msg441046#msg441046 date=1159201049] [quote author=yartax link=topic=109432.msg441033#msg441033 date=1159200107] I have a problem with IE timeout (or any browser).[/quote] Was replied with this: [quote author=mewhocorrupts link=topic=109432.msg441037#msg441037 date=1159200593] I looked this one up, and PHP had a bug submission for it... They marked it as bogus, since it doesn't happen with any other browser. [/quote] I'd say that you've possibly misunderstood something somewhere mewhocorrupts. yartax, maybe you need to look at why you're code's taking so long to execute as opposed to how to increase the timeout settings.  How long does the query actually take to run when executed in MySQL? Regards Huggie [/quote] You'd be correct.  Somehow I completely ignored the information in parentheses.  I apologize.
  8. [quote author=yartax link=topic=109432.msg441033#msg441033 date=1159200107] Hi, I have a problem with IE timeout (or any browser). I have a php page that executes a very long stored procedure before show results. The problem is that IE close connection if no receive data within 30 second. I saw that modifying registry it can be raised up to 2 minutes. But my query is more long that 2 minutes and page load fails. In the php.ini I set maxium execution time for script to 30 minutes. So php is running, but IE has closed connection. Any idea? Thanks. Yartax. [/quote] I looked this one up, and PHP had a bug submission for it: [url=http://bugs.php.net/bug.php?id=27781]http://bugs.php.net/bug.php?id=27781[/url] They marked it as bogus, since it doesn't happen with any other browser.
  9. [quote author=jmilane link=topic=109424.msg440990#msg440990 date=1159197991] I want to email the equivalent of [code]<a href="http://www.mysite.com/script.php?=32">View Record</a>[/code] [code]<a href=\"http://www.mysite.com/script.php?=$lastid\">View Record</a>;[/code] [/quote] What they meant was that in your link, you didn't specify what POST variable $lastid is supposed to be assigned to.  Your link wouldn't work because of that.  The "[/i]" thing was a formatting error, but it took me a moment to figure out what it meant too.
  10. [quote author=bigkev1983 link=topic=109390.msg440974#msg440974 date=1159196465] $query_directory = "SELECT * FROM directory WHERE Name LIKE '%$_POST['name']%' ORDER BY id DESC"; [/quote] That's your problem. You can't reference a associative array, such as $_POST, within the quotes of an expression.  It should look more like this: <code> <?php ... $q = "SELECT * FROM `directory` WHERE `Name` LIKE '%" . $_POST['name'] . "%' ORDER BY id DESC;"; ... ?> </code> I'm pretty sure that that is your problem.  Let me know if it helps.  Oh, and if you want to use "%" in a sprintf(), you need to backslash it, like sprintf("something something percent sign = \% and again \%");, otherwise it takes it as a sign that your going to drop a variable into it, and its looking for an type identifier.
  11. I think a JS timer would fix your problem. <code> timerID = 0; timerID = setTimeout("UpdateTimerFunc()", 1000); function UpdateTimerFunc() {     // Do whatever you need to do here. } </code> It's the closes you'll get to actively monitoring a form field, as far as I know.
  12. You're form's method is "POST", but your using the $_GET global to retrieve values and drop them into statements.  I only skimmed the code, as I am at work, but what's the reasoning behind this? Honestly, though it's not considered as safe as being specific with your form data, I use $_REQUEST[] whenever I can.
  13. [quote author=Gregg link=topic=107375.msg430767#msg430767 date=1157737546] Ok, the feild i am trying to pull the info from has serveral values. It's on my results page, and it shows all the users matching there discription.. (0) (1) Male (2) Female (3) Couple (4) Group (5) Couple FF (6) Couple MM And i can get it to work using this but it wont pull all the values. [code]<? if($rowuser["genderid"]%2==0) echo Female;    else echo Male; ?>[/code] [/quote] I'm a little confused by the code you included in your post.  Why would you use the modulus operator to determine if they are male or female?  What if the "genderid" is "5" -- Couple FF -- the code you have would print Male.
  14. [quote author=LOUCHATS23 link=topic=107374.msg430763#msg430763 date=1157737236] Hi, I am very new to php and very familiar with html.  A friend has created a dynamic web site in php and I am trying to help him change the headings for his site.  I am used to index.htlm and how to use it..... but now in see index.php.  Totally unfamiliar with php, how can I add some html tags  to the header????? [/quote] If you have the HTML file ready to go, you can save some time, and make the code a little more modular, if you do something like the following: [code] <html> ... <body> HTML to be displayed via a PHP script... </body> </html> [/code] And the PHP: [code] <?php ... include("name_of_html_file.htm"); .. ?> Just place the aforementioned code at whatever point you require the html to be displayed.  If it's in the header, then just place it at the top of the PHP file.  Just remember that if you are using sessions, be sure to have the session initialize before you include the HTML file.[/code]
  15. You can use cURL and some easily formatted online WHOIS form to get the information, parse it, and store it in pieces. Try plugging this service: http://www.whois.net/whois.cgi2?d=someaddr.com It gives the nameservers.
×
×
  • 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.