Everything posted by ClareJonsson
-
Uh oh...Disaster plz help if u can
Okay first thing to do is make sure the keyboard is plugged in correctly, pull it out the back and plug it back in. The other thing that may cause this is if hour hard drive has been damaged, the BIOS may be sitting there trying to detect the hard drive and will never get past that stage. You could try unplugging your hard drive and see if you can gain access to the BIOS.
-
Downloading/Buffering Issues
Have you tried resetting your router? Sometimes the ADSL connection needs to be re-trained and resetting the router causes this to happen. Also I have seen problems with certain routers causing slow down after being left on for a prolonged time. I suggest resetting it about once a week. The other thing to check is that your wireless connection has good signal strength. What's in between your PC and the router? Are people likely to be walking in the way of the direct signal path? If so, can you move the router somewhere else?
-
Creating a website in Dreamweaver using MySQL and PHP
You really are trying to over complicate things. Start from scratch, create one user table with all the required fields about the user info etc. But add an additional field which is called AccountStatus. new users has the field set to New. Validated users has it set to Validated etc.... all you need to do is check one field to see if a user can access the site. Forget about the new and registered thing, there's no point. You can do it all in one field, not only that, if someone was being an idiot, you can change their account to banned and stop them temp from access etc....
-
Looking for a free webhosting site
You don't really need the webhost to have PHPMyAdmin you know, you can easily install PHPMyAdmin on your own webspace if you like. FTP it to a folder within the webspace (Suggest calling the folder something random that you will remember), follow the installation instructions in the Documentation.html file, and hey presto your own PHPMyAdmin.
-
Creating a website in Dreamweaver using MySQL and PHP
It seems like your code is fine, but if you're still getting problems, try making a single page called testmail.php with just the email script on it. Also try using my example script. One of the things that can stop emails from being sent is the SMTP settings are not correct in the c:\windows\php.ini file. If you're using localhost then you may need an SMTP client installed. Normally PHP would be installed on a server that already has an SMTP service installed. Try setting your SMTP server to be the one your email client is set to use. So you're using the ISP as the relay instead of localhost. The only downside is if your ISP requires authentication then as far as I know PHP doesn't support SMTP authentication. Okay, a quick lesson on quotes! Single quotes uses the exact contents of the string contained by them, while double quotes parses the string replacing any variables and special characters. Here's an example: $name='Fred'; echo "The name is $name!"; //echo using double quotes The above would echo to the browser the following: The name is Fred! Doing the same with single quotes: $name='Fred'; echo 'The name is $name!'; //echo using single quotes The above would echo to the browser the following: The name is $name! It wouldn't replace $name with Fred as single quotes tells it to use the exact string. To get the single quote version to work you would do the following: $name='Fred'; echo 'The name is ' . $name . '!'; Notice that I closed the string and then used a . to connect $name to it. A full stop is used to combine strings together. Q. So which method is better? Isn't it easier to use double quotes all the time? A. Using single quotes is better practice, the main reason is that every time you use double quotes, php looks through the string first in case there's something to replace. This takes time, and that's the point. Using the following: echo 'The name is '.$name; would run faster than using: echo "The name is $name"; The output would be exactly the same but when you have a page that has hundreds of echoes in them, all those milliseconds all mount up making your pages slower to load. This is called "Optimisation", or in this case 'Optimisation' :) . This is better for you as your pages will feel more slick, and better for the web server as it's likely to be running more than one php scipt at a time. Don't forget that you may have thousands or more requests for php pages on a server, and any optimisation of your code is always a good thing.
-
graphic card..
When it tells you that you have an intel chipset, that is exactly that, the chipset, which is not the make of your on board graphics. The chipset is more related to the architecture of your laptop and is also related to the USB and memory management etc. It does a lot more than that but I won't go into it here. The quickest way to find out what your graphics card is: 1. Click Start. 2. In the Run box (XP) or Start Search box (Vista) type dxdiag and press enter. When Direct X Diag loads, click the Display tab. That is what graphics card you actually have. It should also tell you the driver version etc.
-
Creating a website in Dreamweaver using MySQL and PHP
Yes by all means post your email routine! But in the meantime, here's a simple email routine I sometimes use: $from='[email protected]'; $headers = "From: $from\r\n"; $headers .= "Content-type: text/html\r\n"; $to=$EmailAddress; $subject='Place subject here'; $message='This is the message'; mail($to, $subject, $message, $headers); By the way, have you figured out the difference between using single or double quotes yet, if not I can give you a quick run through as it's quite important.
-
Creating a website in Dreamweaver using MySQL and PHP
OK Two of the things you need to do: 1. In the registered_users table, create an int field called User_Ref that is the Primary Key, and set it to auto increment. What this does is, every time a record is created in the registered_users table, it automatically gets a new unique number. 2. Create the user_info table, and have one field also called User_Ref that has the same number as the User_Ref in the registered_users table. So anytime you need to check their details, you have a common unique number between the registered_users and user_info tables. Or more simply, you could always forget the above and just add the extra fields to the registered_users table and leave the details blank until the user fill them in. Regarding session variables, at the very top of the page do this: <?php session_start(); ?> This should be before anything else, even before all HTML. session_start(); opens the session and should be at the top of all pages that use a session. Regarding the email, you will probably have to setup the SMTP server, if you use an email client, look at what your SMTP server is set to. Note that down and open up the file c:\windows\php.ini and locate the SMTP section, edit it to reflect your SMTP server and your email address. It may look something like this: [mail function] ; For Win32 only. SMTP = smtp.MyISP.com ; for Win32 only smtp_port = 25 sendmail_from= [email protected] ; for Win32 only Don't forget to backup your php.ini file first just in case of accidents.
-
Creating a website in Dreamweaver using MySQL and PHP
Okay, we now know how to use a function called strip_tags(). Now you may want to know that you can create your own function. Your own functions can be used over and over and are worth their weight in gold. What if you wanted to perform certain actions on a lot of strings, such as strip_tags and removing single and double quotes, you could write something like this: $item='"Hello"'; $RemoveThese = array("'", '"', '\'); //sets up what to remove from string $item=str_replace($RemoveThese, "", $item); //removes anything in the $RemoveThese array. $item=strip_tags($item); //Strip all tags from $item echo $item; The output would be just Hello with the quotes and tags removed. But doing that for every string will be a pain. However, you could create your own function and call it instead of typing it in for each string check, I have named my new function stripy_string(): //Place the function at the top of the page. function stripy_string($TheString = ""){ //This starts the function $RemoveThese = array("'", '"', '\'); //sets up what to remove from string $Output=str_replace($RemoveThese, "", $TheString); //removes anything in the $RemoveThese array. $Output=strip_tags($Output); //Strip all tags from $Output return $Output; //Returns the string $Output back to the main program } // This ends the function //Now we can use the function! $item='"Hello"'; //setup $item variable for test $quantity='"Byeeeee"'; //setup $quantity variable for test echo stripy_string($item); //echoes the result of the function $quantity=stripy_string($quantity); //Runs the function on $quantity, and assigns the output back to $quantity echo $quantity;
-
Creating a website in Dreamweaver using MySQL and PHP
Well you almost got it right. If you wanted to combine the output into a single variable (array) you could do something like this: $quantity[0] = $_POST['quantity']; $quantity[1] = $_POST['item']; Or you can combine it into one line by doing the following: $quantity = array($_POST['quantity'], $_POST['item']); And to retrieve the data you would use: echo $quantity[0]; //This echoes the quantity. echo $quantity[1]; //This echoes the item. If you don't want to use numbers and you would like to use something more meaningful, you could do the following complete with echoes: $quantity = array("quantity" => $_POST['quantity'], "item" => $_POST['item']); echo quantity["quantity"]; echo quantity["item"]; Now what if you wanted to load more than one record into the array, such as 2 items, each having their own quantities? Here's how: $quantity[0] = array("quantity" => $_POST['quantity1'], "item" => $_POST['item1']); $quantity[1] = array("quantity" => $_POST['quantity2'], "item" => $_POST['item2']); echo quantity[0]["quantity"]; echo quantity[0]["item"]; echo quantity[1]["quantity"]; echo quantity[1]["item"]; Obviously the above code would more likely be used to pull items from a database and not from a form. Bye for now, Clare. P.S. One point: Don't use POST variables throughout your code, grab the values at the beginning of the PHP and load them into standard variables. POST should only be used to retrieve information from a form, i.e. what a user has typed into text fields or what options they have selected etc.
-
Creating a website in Dreamweaver using MySQL and PHP
Okay I think we need here to get yourself into focus about how dreamweaver html and php relate to each other. HTML is the markup that makes a web page, it's basically text, styles and tags that define the fonts, colours, images etc. Dreamweaver is just a tool for creating these pages. You don't use PHP to create pages. The forms you have created in Dreamweaver should be just fine. I think now you need to learn php, forget for the moment designing the pages, when you grasp the relationship between php and markup, things will become much more clear. OK take a look at this tutorial, and work your way through it, you could probably skip the first bit as you already have php and mysql installed. One thing to note, when editing php with Dreamweaver, make sure you are in code view and not design view. Also, don't just read through the tutorial, try the examples! It's the only way you will really get the feel of it.
-
Creating a website in Dreamweaver using MySQL and PHP
I still think it's more fun writing something yourself. There's no way I can find applications out there that does everything I want. Take that compatibility list for instance, and I'm in the middle of completely redesigning that site, as now I know I can do a much better job and I have an updated list of requirements, all that for fun :) Lets face it, some of us love to get our hands dirty. I have loved to code ever since a boy at school showed me his ZX81 (No jokes please). One thing I could see from your last post was, no matter what it is it can be broken if someone was really intent on it. Regardless of it being open source or home grown. Nothing is perfect. Anyway, lets get back on topic shall we and give the guy any help he asks for.
-
Creating a website in Dreamweaver using MySQL and PHP
Initially yes, but as you become more proficient your code will become less hackable, and you will be better at debugging your own code. I have had to fix some problems with free software such as a guestbook a friend ran on his site because robots were posting masses of rubbish. Oh and not forgetting the big Hoo Haa PHPBB had a few years back with the mega security problem. But I think you may have missed the point I was making, the point was that being open source, everyone has access to the code, and that means if some dirty little swine digs deep enough to find a security hole, they could possibly exploit that on a lot of peoples sites. Where as the code for in house software is not published and usually harder to mess with. If the coder has done their job that is. Oh and another thing, coding is fun, when you get your own scripts running nicely it's really kewl :) On a thumbs up for open source, we have the world using and updating the software so in theory problems get sorted! Doesn't always work like that though.
-
Creating a website in Dreamweaver using MySQL and PHP
You're welcome and yes you're correct, security is a big issue and something you should always be aware of. But saying that, PHP has built in functions to help in this, such as strip_tags, this removes all tags from a variable. Consider someone trying to add a bit of java script that pops up an alert box: <?php $Var = ''; echo $Var; ?> This would pop up an alert box with Hello in it. strip_tags could do the following: <?php $Var = ''; echo strip_tags($Var); ?> This would change the variable to: alert("Hello"); stripping out the script tags. One thing to watch out for is pre written scripts and software, such as this forum. Because it is freely available you have the source code, and if you find a security hole you could use such an exploit on someone else's site running phpbb. Code written by yourself is generally harder to crack as nobody knows exactly what you have done, and they never get to see the source! The other thing worth noting is that PHP can generate code for other languages, such as the javascript alert above, a good example of this was a site I wrote as a proof of concept. I wanted to create a sort of folder structure which is dynamically created from a database. Take a look at the system selection bit on the left: Checklist to see what I mean. Basically what is happening is that PHP connects to a database, retrieves all the data and then generates the javascript that controls the menu!
-
Creating a website in Dreamweaver using MySQL and PHP
I use dreamweaver for all my web editing, but never in WYSIWYG view, always in code view for the very reason stated above. Dreamweaver is also quite good at taking away mundane things such as basic CSS, but I still end up writing more complex styles by hand. The package is a very useful tool, if used correctly. i.e I use it is a hyped up text editor that's PHP, Javascript and XHTML aware :). Oh and line numbers are a definite plus for debugging!
-
Runescape running on laptops
I run runescape on my laptop sometimes, which is about a 2 year old centrino with 512 meg ram running XP. One thing I find is if I run in it in high Detail, the audio is out of sync, i.e. the audio is slow (Sound effects happen after the video) But apart from that, it's all Hunky Dorey! Any new laptop will run it totally fine, I am guessing you are going to be getting a Dual core system? If so, then I will quote Keith Chegwin: Wahey! TTFN, Clare.
-
Creating a website in Dreamweaver using MySQL and PHP
okay, here is a very quick rundown of how a web server running PHP works: The server itself is running what is called a service that is constantly listening on a TCP/IP port for web page requests, this port is usually port 80. When it receives a request it sends the relevant page. So when you go to a website, your browser has sent a page request on port 80 to the server, the server then sends the requested page to your browser, quite simple really. Oh and one thing, the server then forgets about you. So how does it deal with PHP? OK what happens is this. When the server is asked for a file with the .php extension, it doesn't simply send you the page, the server parses the page through a php interpreter, and what that does is the following: The parser checks the page line by line, all HTML is sent straight to you, but as soon as it comes across <?php, the parser knows that the following is PHP code and it will run the code, anything echoed is sent to you, nothing else. The code is never sent. When the Parser encounters ?> it then goes back to html mode and sends everything to you again. Take a look at this simple code: Hello there <?php //This starts the php code $Name="Fred"; //Sets a variable called $Name to "Fred". echo $Name; //Echoes the variable called $Name to the browser. ?> //Ends the PHP section and reverts back to normal HTML How are you today? What will be sent to the browser is: Hello there Fred How are you today? And this is how it looks in the browser: Hello there Fred How are you today? Remember I said earlier that the server forgets about you after it has sent you a page? So how about sites such as this forum that does remember you, how can variables be passed on from one page to another without using forms etc? Well there are special variables called Session variables. When PHP opens a session it sends you a cookie with a unique identifier, your browser rememebers this and from then on it sends that cookie with all subsiquest page requests to the server. The server has variables associated with your session, and picks them up each time you request a page. Sessions are killed if you close the browser, and they also time out after a period defined in the PHP.ini file. This all sounds rather complex but when you get your head around it it's very simple! So to recap: Webservers send HTML pages directly to your browser and then forget about you. Webservers parse PHP pages, all HTML is sent to you, but only the output from PHP scripts is sent. PHP uses sessions to track your way around a site, without sessions, sites like this would be almost impossible and security wouldn't exist. If you have any questions then please feel free to ask. TTFN, Clare.
-
Could someone tell me the problems with Vista ..
The only problems I have had on Vista is compatibility with some of the packages and hardware I use, for instance: Nero Burnin Rom 6 I had to upgrade to version 7 Pinnacle Studio 9 Plus I had to upgrade to Studio 11 Plus. Power DVD Guess what? Yes upgrade! Fenix coding environment, i.e. Win32 Runtime and Flamebird2 This will not work at all, I use XP running on Virtual PC 2007 to get around this issue, it's not a solution just a work around. One other thing to note here is that my hardware supports virtualization, so XP runs very fast on Virtual PC 2007. Netgear SC101 SAN device There is no driver support for this yet, so Vista cannot connect directly to it making over 300Gb of data a little redundant. Until drivers are released I have my server connected to it and shared out. This works but it's obviously slower than a direct connection. Oh and I cannot get Fable to run on Vista, which is silly being it's a Microsoft product :). Apart from the above my vista runs fine, and we also use Vista on a variety of systems where I work, and no real issues with it at all. No networking problems, and we do a lot with network, from wireless to connecting to domains. No worries there. I agree about UAC being a pain in the [wagon], but on my system I have turned it off anyway.
-
DVD drive not working
Well that does look like a conundrum you got there. So if I am right, your CD-ROM is plugged into an IDE port internally in your PC? If so I wonder if either the firmware on the CD-Rom has gotten corrupt or has the device got a hardware failure? Have you tried starting up in safe mode and removing the device driver and rebooting? I have also seen the drivers for certain devices become corrupt, and also the repository for driver restore becoming corrupted too. The last time that happened the OS was so badly damaged that a re-install from scratch was the best option. Did you every try going back to an earlier restore point. I doubt this will help though as you said it hasn't been working for a year, and I bet you done loads to the system during this time. Have you looked at what the BIOS reports the CD-Rom as? And have you tried to boot off it?
-
Movie Editors that *Work* with youtube.
I use Pinnacle studio 11, that does about anything!
-
3D renders using Art of Illusion
Hi folks, I have always been a fan of 3D rendering, and have been looking for a good free model creation and rendering package for a while now. A few months back I came across Art of Illusion, a free Java based app that was exactly what I was looking for. Here's some of the output from said package: This turntable was the first thing I attempted. Doesn't look too bad I thought. A nice little Lava lamp was next. Obviously a bowl of fruit. My first attempt at using only one light source. My fist real attempt at lathing some glass. Yayyy, Wine! Using the same lamp from the bowl of fruit! This is a model of my Windows Mobile thingy, it could do with more detail. Amazingly enough this was very simple. A basic cube primitive bump mapped with borg cube images and planet backdrop! Ahhh, now we come to the reason why I wanted to try my hand at rendering. I saw someone else's render of a Dalek and knew I could do better. This was my first Dalek model, and I'm in the middle of building a better one, so stay tuned! My first big scene render, they are the original war machines from Jeff Wayne's War of the Worlds. I wonder what this is? :lol: Well that's about it for now, except for my signature which is a render of a GP2X, only in red instead of the usual black.
-
Able to access internet but not router - any advice?
If you're going to be buying a new router, get a Netgear one, experience has taught me they have excellent routers, much better than a lot of others. Steer away from D-link as I have had bad experiences with their routers. My present wireless router is a Netgear DG834G, and It's totally superb. And configuring the Port forwarding is a breeze.
-
Anti-Keylogger?
I don't see the point of an anti-keylogger. If you got a keylogger running then you already got some form of spyware on your system. Use a good antispyware detector such as Defender and Ad-aware, and that will be enough, no need to run yet another so called Anti-Whatever program.
-
Rate My New Comp.
Yes that's correct, it's Vista only I'm afraid. It all ties in with the core systems MS has developed for Vista, such as the completely re-written audio sub-system bringing us much lower latency, meaning games will be able to generate more audio effects in real time. The sound in Vista is also good news for audiophiles as presently the Vista driver model has even less latency than current ASIO drivers!
-
Rate My New Comp.
Just to raise awareness about Windows Experience rating, this will become more important in future. Presently, games have a hardware requirement, cpu, gfx and so forth. Quite soon we will see games having a Windows Experience requirement on the box. Which will be much easier judging if a game will run correctly on your system. The down side to this is when MS start to release service packs, the Windows Experience results will change. So I'm guessing it will say something like: Minimum Requirements: Vista, Windows Experience 4.3 SP1 Recommended Requirements: Vista, Windows Experience 6.2 SP1 The above means if you want to get the full experience from the game, you will need to have Vista, Service Pack 1, and have the hardware level to give you a Windows Experience level of 6.2!