-
Posts
471 -
Joined
-
Last visited
-
Days Won
8
Everything posted by dalecosp
-
You're welcome
-
<?php if(isset($content)){ include($filepath); } ?> You replaced the string in $content, but you're including $filepath, the unchanged HTM file. Try: <?php if(isset($content)){ echo $content; } ?>
-
Probably not while I'm at work ;-) We'll see if time allows later.
-
Um, you didn't change it. Not in the post above, anyway. It still says: foreach($categories as $sub_cat_id => $row): Of course, you may have a more insidious issue. Your while() is overwriting $row, too. Something like: $x = 0; while($row = mysql_fetch_assoc($result)) { $categories[$x][$row['sub_cat_id']] = array('name' => $row['sub_cat_name']); $categories[$x][$row['sub_cat_id']]['topics'][$row['sub_id']] = array('name' => $row['topic_title']); $x++; }
-
Yes; I would do some securing of POST. In particular, if POSTing can be allowed from anywhere (I'm assuming since the Flash is on the client side, it's coming from the WWW at large). If someone can disassemble the SWF file, they can find out where to POST to. For that matter, anyone with a packet sniffer or riding tail on a proxy or firewall log can figure out where your Flash is POSTing to. That done, the door is open to send bogus POST data, and that's why you need to make sure all data coming from outside is sanitized...
-
eBay store template with dynamic categories?
dalecosp replied to crf1121359's topic in PHP Coding Help
Right ... spend some money on it, then. ;-) -
You're overwriting the variable "$row" here: foreach($categories as $sub_cat_id => $row): ?>
-
Hum diddy ... (sorry, bit by another bug apparently ...)
-
Not sure; if I remember right, minimum post count, or it's a time-out and you could've if you'd done it quick enough ... but it appears that your posts are two minutes apart so I'm guess it's the post count...
-
Incidentally, I now notice you have similar code in your left editor of the screenshot. What is the problem, exactly?
-
system("/path/to/ping $ipaddress",$foo); if ($foo) { echo "IP $address is offline!";} UNIX-based, anyway. Keep in mind that a system call that's successful returns zero
-
And that's the error. If $sum were a real non-zero number of some kind, you wouldn't have an NOTICE error about it being undefined...
-
Copyright/contact in white over white graphic isn't quite readable. Perhaps right-alighment? Or a contrasting color text. I suppose I'd second the thoughts on a responsive design IF you're a designer. I'm finding out I'm not much of one ;-)
-
Are you using a debugger? I'd expect to see some feedback/error messages. Try this? <script type="text/javascript"> var link = document.getElementById("CmtBox"); link.onclick = function () { document.getElementById("comment").style.display = "none"; }; </script>Note that the name of the function is "onclick" ... in particular, "link.onclick". Don't try an give an anonymous function another name (like "link").
-
You're welcome!
-
Print and Web Designer - php newbie from Cleveland, Ohio
dalecosp replied to genoMU69200's topic in Introductions
Welcome! And that sounds like a new meme-in-the-making: (And don't worry about it ... keep using PHP and you'll get better soon!) -
Rather a mess with your brackets there! Is this better? $ip = gethostbyname('www.facebook.com'); if ($ip == '46.123.70.198') { //this is the ns after dns filter for facebook.com echo "Smart DNS Is Set up "; } elseif ($ip == '193.123.9.65') { //this is true ns lookup echo "Smart DNS Is Not Set UP"; } Not sure where those extra semicolons and colons came from ...
-
All the error is saying is that "ereg()" (and "eregi()", which is what this script is using) are now deprecated in PHP. They will, one day, be removed and your script won't work when the language is updated to that version, whatever/whenever that is. So, logically, you should update the script to use the PCRE functions instead.
-
Our company has a "designer" whose background is actually in print and print layout, graphic design, etc. So "page development" here is taking printed documents and turning them into WWW docs according to the "blueprint". I also complete other programming tasks (related to functionality), as requested by the head of the I.T. department ... for example, I've taken web sites that were based on a certain platform and planned and executed a switch to a different platform. This required knowledge of a couple of different database systems, a general concept of data management and mapping, scrupulous discipline for backups and tons of testing, network knowledge, and the creation of several "glue" scripts that help things together at critical junctures. When a bug surfaces, or something needs added to a web "page" ... yours truly is the "go to" guy. I have a degree, but it's not I.T. related. So, my perceived skill got me the job; the degree was simply assurance to them that I was, indeed, as smart as I said I was, more or less. Hopefully that helps.
-
Preselecting checkboxes based on values in database...
dalecosp replied to xfilterx's topic in PHP Coding Help
Are we sure that $selectedAssets is a valid result object here? while ($rowSelAssets = mysqli_fetch_array($selectedAssets)) -
Preselecting checkboxes based on values in database...
dalecosp replied to xfilterx's topic in PHP Coding Help
What exactly IS being output to the browser? -
Preselecting checkboxes based on values in database...
dalecosp replied to xfilterx's topic in PHP Coding Help
1. "dump the table into a dataset" ... OK; in PHP, you probably have to setup an array to hold the data, and get your data into it. Show how you're doing that now? Here's an example from something I wrote recently: $x=0; $plist = array(); while ($row=mysqli_fetch_assoc($res)) { $plist[$x]['model']=$row['model']; $plist[$x]['url']=$row['url']; $plist[$x]['brand']=$row['brand']; $x++; }//while2. "For Each loop" ... pretty standard in most any language. 3. "Use a nested loop" ... again, pretty standard. I guess we *really* need to see your dataset code. Let me state that the examples we've been showing are using echo() to print the results immediately. There's not any reason it would *have* to be this way; you could certainly create a variable and repeatedly concatenate new text to it to use later or return if this was all wrapped up in a function/class whatever. I don't have any ASP experience in particular; it sounds like you just need to think a little "deeper" into what you actually want the software to do. And perhaps that's too easy for me to say; I've been used to doing PHP for years and grabbing a dataset as I did above is very plain, boring work for me these days. Maybe it isn't for you yet. I'm sure if I were thrust into a .NET project I'd be the one asking *you* for help ... :-) -
Preselecting checkboxes based on values in database...
dalecosp replied to xfilterx's topic in PHP Coding Help
Ah, yes, my bad. I've just gotten in the habit of treating it that way I guess. Hard ever seem to use fetch_array anymore..... -
Perhaps cURL isn't enabled? Works fine here in CLI. Lots of hosting companies have things like cURL and remote_url_fopen turned OFF ... and some of them won't let you turn it on, either...
-
Preselecting checkboxes based on values in database...
dalecosp replied to xfilterx's topic in PHP Coding Help
$sql = "select standards_process_id,standard_id,process_id from standards_process $whereclause $order_by;"; $res = mysqli_query($db_conn,$sql); if ($res) { while ($row = mysqli_fetch_assoc($res)) { echo "<input type='checkbox' name='process' value=". $rowProcess["process_id"]; if ($row['process_id'] > 0) echo "selected='selected'"; echo ">" . $row['somevar'] . "<br />\n"; } echo "</td></tr>\n"; } I'm probably not understanding something (mean this is meant to stimulate thinking, not be a "drop-in" solution). You do need to use fetch_assoc instead of fetch_array if you want to use string indices on your arrays, though; fetch_array only returns an integer-indexed array... HTH,