-
Posts
4,362 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Zane
-
Turn on error_reporting for one. error_reporting(E_ALL); ini_set('display_errors', 1); Are you sure that thread_id is even set? Put in some echos and die(s) above and below figure out when you're script is finishing execution.
-
Are donations to specific users okay?
Zane replied to Monkuar's topic in PHPFreaks.com Website Feedback
Mine are in my signature -
Any SQL advice Barand gives you, soak it up like a sponge. He (and fenway) have helped me several times over the years, without any disappointment. Creating a blank table with premade records is the most inefficient way possible to do what you are doing. One day can have several appointments from what I gather so what good would it do you to prepopulate a table? Again, you will have multiple appointments for a given day, so using the DATE as a primary key will not work like a primary key should. Most primary keys are set to auto-increment, so what is going to happen when you want to add a new booking appointment? You'll have to insert the date everytime and not only that, you would need to check if there is s a duplicate key, since you're not automatically incrementing your index. What Barand has shown you in the other thread is more than enough to get started. Read over it several times if you have to. I'm closing this thread so you can continue with your original one. http://forums.phpfreaks.com/topic/290480-appointment-booking-script-for-calendar/?do=findComment&comment=1487931
-
How to keep kids from tampering with Internet Explorer history on Win8
Zane replied to sKunKbad's topic in Miscellaneous
Install and exclusively use Google Chrome Install a Adblock AND Adblock Plus, to keep tempting clicking of ads with chicks with really nice racks and nice everything else... raw. Well not just to keep them from clicking it, but from having it appear at all on the webpage. You can also install VNC and remotely access the computer from somewhere else, like your batthroom, sitting on the toilet with your laptop with nothing on your mind other than what your son is falling witness to on the evil Internet. By adding all of these obstacles to your son's internet experience, you are forcing him to educate himself further and further into how to bypass security. Whatever you tell a kid not to do, is exactly what they will do. Perhaps you could just sit down with him while browsing these evil areas and traumatize him with awkwardness, sort of like how parent's make their kids smoke an entire pack of cigarettes to teach them smoking is bad. -
How to keep kids from tampering with Internet Explorer history on Win8
Zane replied to sKunKbad's topic in Miscellaneous
If your son is capable of this, then it shouldn't take long for him to google around your keylogger, or firewall. Kids are much more inclined to excel in the digital age than the generation from a decade ago. The internet is always crawling with trolls, naughty pleasures, and debauchery. I don't want to tell anyone what to do with their children, but IMO, if you don't want him to witness the evils of the internet, then don't let him use the internet. He will eventually find a way to get access though because the internet is everywhere. He's just one question away from using any restaurant or book stores' or libraries' wifi,...... "Can I get the wifi password?" If they say no, then just head down to the next hotspot, lather, rinse, and repeat. -
echo "<pre>", print_r($_GET), "</pre>"; This is just a start. It will show you what $_GET contains, in a clean, readable format. To get the values, simply grab it with $_GET['thekeyname']
-
But that is exactly what you asked for right? Someone to tell you, why, what, where, and how. I can see your main question in the title of this thread, that is great, but your post contains nothing but your code(s). Apparently, members.php is not displaying the username. Are you sure that your query is correct? Are you sure that the SESSION is right? gerkintrigg mentioned only one helpful thing, debug. He forgot to mention and educate you on some basic debugging techniques. For instance, to check your SESSION contents, use this snippet echo "<pre>", print_r($_SESSION), "</pre>"; You will want to use this snippet to check out most of your variables. There is also error_reporting, display_errors, var_dump, and just plain echo statements. If you can't successfully get the username, then either your query isn't returning anything, which should return an error, or your logic is all wrong. EDIT: Also, why are you using fetchColumn() when you could just use fetch() which would give you everything in that row as an array?
- 10 replies
-
- php
- authentication
-
(and 2 more)
Tagged with:
-
How to keep kids from tampering with Internet Explorer history on Win8
Zane replied to sKunKbad's topic in Miscellaneous
If your child is using the same computer as you, then just setup a limited account for him. He doesn't have to use the same account as you, that would be the source of your problems right there. The honor system is a horrible security measure. Another option is to edit your hosts file, automatically redirecting bad sites to nothing. That would also mean that you couldn't go to them, so if you don't want your children checking our your favorite porn/weather site, you might have to write a script that will edit your hosts file on the fly. There are several ways to accomplish this, but ..... they will all take a lot of time and effort on your part. This generation of kids have grown up with the Internet, they do not know what the world is like without it, they are essentially better than us at using the Internet anyways. Several young people make quite a bit of revenue simply from uploading their cell phone videos. -
It also helps us tremendously to have code written beforehand. Otherwise, you might as well ask "Is this a good car?" To answer you question without you having given code, just use the SELECT HTML tag, with OPTION tags inside.
-
Why is the frame not displaying when using "\n" tag
Zane replied to eldan88's topic in PHP Coding Help
No idea what's wrong. It must be on your end. Put a carriage return \r in there, maybe that'll fix it? $iframe = "<iframe src='menu_new.php' width='65%' name='menu' id='menu' title='Menu Frame' ></iframe>\r\n"; Are you sure that this happens exclusively when you put the newline character? -
Could you be any less specific? And surely you've got more code than that.
-
I can't believe I missed that detail. I meant to write Hypertext Preprocessor
-
There's no need to create a form in a loop, making several forms. I'm surprised that you get the "second" value, and not the last one. Maybe you only have two loop iterations. Put the form tag before the while loop, and the end form tag after the loop.
-
No. Just as you read, it used to stand for Personal Home Page, but they then changed it to something called a reverse acronym or something. So, anyway, PHP stands for Hypertext Preprocessor. -edit for -pre
-
Same as kicken and daviddennis, I usually only find myself using it on array elements.
-
Yeah, your worst decision ever was to host your site on GoDaddy. The company wasn't meant to be a web host provider, it was made to be a registrar, which, IMO, they do just as good a job as any other registrar does. It's not like you can make a domain faster, all you do is set your nameservers and forget about GoDaddy until it's bill time, or you switched hosts.
-
SQL Server to MySQL (in-house server to remote Linode VPS)
Zane replied to Zane's topic in Application Design
This SymmetricDS is driving me up the wall, I really want to use it, but I can't get the sufficient information to do what I want. I've posted two questions on their forums and it doesn't seem to be a very active place; but they have a billion and one different user guides and tutorials with hardly any examples. I downloaded a trial version of SQL Examiner, which is GUI-based, and it seems to do a somewhat decent job, I mean it actually makes the full database comparison and updates the MySQL database successfully on the remote server just fine, but I have to initialize the replication manually. I experimented with scp and like it very much, but again, replication would have to be manual unless I come up with a script to automate it, and not only that, I would need to create a listener script on the remote server. And it's not like I need to synchronize the entire database, but rather, only a few tables, from some of which I would only need a few columns. SQL Server comes with something called Linked Accounts where I can actually query my remote mysal database as if it were local, and eventually I ended up researching triggers for all updates, inserts, and deletes..., but again, I find myself realizing that I suck as a database administrator. My last resort to this problem would be to schedule an sql dump to run on the in-house server periodically throughout the day, send it to the VPS overwriting an SQL import file, then create a crontab on that VPS that will import that dump periodically... Why does something that seems so damned simple have to be so damned complicated? -
SQL Server to MySQL (in-house server to remote Linode VPS)
Zane replied to Zane's topic in Application Design
SymetricDS seems like a great solution. according to it's documentation, I can run it as a service on my Windows machine (the in-house root node), and have it push data. What I have yet to find in the documentation, is how to set it up to replicate to the client... runhavning MySQL. It has to be possible, I would need to actually try it out before I have any decent concrete questions. One of my greatest goals here is to avoid getting a static IP. If I can get this SymetricDS to do nothing but send data to the VPS, then this will work perfectly; I just need to tinker with it a bit, probably more than that. So, the Centos VPS "client" node should only receive, while the in-house Windows machine "root" needs only to send. Great find. Thanks kicken! -
SQL Server to MySQL (in-house server to remote Linode VPS)
Zane replied to Zane's topic in Application Design
Amazingly good news. Apparently, this RFMS software does not come with a Sybase SQL Anywhere database like I was told, like I read from the documentation. Instead, I had to install Microsoft SQL Server Express 2012. I'm not sure if the Express version has a different approach as far as connecting, but I am assuming I do not need to install a Sybase PHP module now. -
SQL Server to MySQL (in-house server to remote Linode VPS)
Zane replied to Zane's topic in Application Design
That's exactly what I'm going for, transparent updates. So apparently the mysqldump method is out of the question. I must use the MASTER/SLAVE option. --- but I would still need to forward ports and such to open an SSH tunnel? I was thinking about opening a SSH tunnel from the in-house server, would I still need to open ports for that? Or would I have to create a tunnel from mywebstore.com. I still have more reading to do, and not to mention.... the practice. -
SQL Server to MySQL (in-house server to remote Linode VPS)
Zane replied to Zane's topic in Application Design
I get the feeling that you misunderstood my idea, but I like the idea of replicating a MySQL database to the VPS from the in-house server instead like you've seemed to understand it. . The idea I originally understood from you was outlined like so I rather like the idea of a custom PHP script for Sybase --> MySQL and then replication to the VPS's MySQL. Anyway, I seem to be getting closer and closer to decent plan. Now I just have to figure out how to implement it. I read this tutorial over; I'm sure there's a wealth of better information out there, but the mysqldump method seems the easiest to me. http://www.howtoforge.com/mysql_database_replication Ccreating a mysqldump from the converted Sybase DB and sending it to the VPS. From the VPS though, I would need a way to listen... a way for mywebstore.com to be notified that it's time to overwrite the database with the sent mysqldump. That tutorial mentions a MASTER / SLAVE method. I would definitely need more documentation to learn that method, I'll have to search for more information, but if you have a better idea, please let me know. As far as sending the mysqldump, I like this approach the best, but I'm not sure if I need to go full SSH, I would imagine that I could just send it through FTP. It wouldn't need to be secure since it's only inventory information. I am trying to avoid having the in-house server, or the in-house network rather, serving anything outbound. I would rather leave it inclusive to the store. I would rather just send everything to the VPS and receive nothing back, other than the ftp status messages. I feel like I'm in way over my head, but at the same time challenged to complete the project. I will definitely learn plenty of new things in the process. -
SQL Server to MySQL (in-house server to remote Linode VPS)
Zane replied to Zane's topic in Application Design
After thinking about it, and reading about it, I don't think I want to, or should, connect to the embedded database directly from the Linode. You mentioned that Sybase is designed to be replicated, so it seems that would be the best option, right? Replicate it to the Linode. Furthermore, I get the feeling that Sybase isn't that efficient for a webserver's data source. So I will not only have to replicate it, but rather I will also have to convert it. So, - replicate to VPS from in-house server - constantly overwrite a mysql database with the converted sybase data. The only way I can think to convert the Sybase to MySQL is with a PHP script that runs on cron every half hour or so. Either that, or there exists a Linux script out there that will do this conversion for me that I don't know about. ... sounds simple enough... Please tell me if I am heading down the wrong track. -
SQL Server to MySQL (in-house server to remote Linode VPS)
Zane replied to Zane's topic in Application Design
I want to do that so much, I'm definitely going to try. I have never had to change the --configure variables for PHP before. Basically, I installed Centos on the Linode, then I installed ZPanel to take care of what I don't know about Linux, although I have been learning more and more, here and there. I think it would make my life a lot easier if i did it that way too. (installing Sybase client onto the VPS). And I'm going to attempt that method first, I do need to learn how to do this stuff I was able to use yum replace to upgrade to PHP 5.5, I should be able to figure this out, right? -------------------- Ok, so my game plan now is to finish setting up the development Linode and somehow manage to install Sybase client onto it successfully.