
steveclondon
Members-
Posts
161 -
Joined
-
Last visited
Never
Everything posted by steveclondon
-
Setting up a (fairly) simple shopping basket page
steveclondon replied to nickholt1972's topic in PHP Coding Help
Yea i use firefox as well and see what he means. It is worth downloading firefox and opera and testing your site when making it, also ie 7 is comming out soon and it is something else to think about. Oh and how to do this. Have a temporary table in mysql that has user id and item in it and session. As the user adds items they are put in here and can be pulled. When an order is placed it will be moved from the temp table to the order table deleting the temp table(not the table just the data for that user and session). It is a good idea to have the date field in the temp table so that you can auto delete any data left in there when people add stuff and don't check out. Each item could just be a get id and you would have the user a $_SESSION id. Then a page that handles collecting the $_GET['productid'] and adds it to the temp table. Hope this helps -
yes it is. If you want to do it exactly as you have there you would do it by using mod_rewite. First you have to make sure that you have access to the .htaccess file on your server
-
code problem..please help. i'm a newbie! :)
steveclondon replied to thebeing's topic in PHP Coding Help
thats just a main header that shows the information from the php script. You should have code that goes above that. If you have a file named index.php have a look at that and see all the files listed in that you might have for example. include 'top.php'; -
Try this one: http://www.phpbb.com/ It is open source but widely used
-
code problem..please help. i'm a newbie! :)
steveclondon replied to thebeing's topic in PHP Coding Help
$showCategories has no value. You must first set a value for this as follows. $showCategories='it will now be this message'; echo $showCategories; If this is part of a bigger script you have you might want to put it up here as i would imagine there is another problem there higher up -
Capturing and storing an uploaded filename
steveclondon replied to Tjobbe's topic in PHP Coding Help
use the $_FILE array. Have a look at the link below and download the manual then search for $_FILE. There are alot of examples there. If you still need help I have post an upload script here before. Remember to check the file name first and get ride of spaces etc and ensure that two names are not the same. -
Posting Form Data To Database and Invoice System
steveclondon replied to ImJustBrndn's topic in PHP Coding Help
You need to see if you have mysql database available on your server. This is the best route first. -
$query = "SELECT * from players ORDER BY points DESC";
-
how to send html email using php mail() function
steveclondon replied to jeboy's topic in PHP Coding Help
you need to put the html headers in the header section of the mail function. Use the link below (in my sig) download the chm of the php manual and do a search for the mail() function. You will see examples of how to put the headers in. If you don't mind using classes there is a very easy class you can use that will do all of this for you. See the link below. http://phpmailer.sourceforge.net/ -
not so much a tutorial but if you are not aware look at the link in the bottom of my post and download the manual in chm form. It is very handy to use as you go along. And if you get the version with user comments you will see alot of examples there that should be a help as well.
-
had a look, makes it very hard without line numbers
-
Insert record into MYSQL table as part of PHPmailer script
steveclondon replied to eskimowned's topic in PHP Coding Help
what is on line 15 -
need help protecting directorys without having a dual login system.
steveclondon replied to Sade's topic in PHP Coding Help
Yes I agree with the above. If you have different levels of users you scripts can check what level they are before displaying a page. -
I want to use php to generate title tags
steveclondon replied to animedls's topic in PHP Coding Help
yes you could. How easy that is depends on the data already available to you or how you structure your data. If you are willing to through some time in and plan it out first then you could do a fairly effective range unique keywords and descriptions. -
I want to use php to generate title tags
steveclondon replied to animedls's topic in PHP Coding Help
This is also a good thing because search engines will also look at the name of you page and if it sees keywords in this as well that can help. If you wanted to go one better you could do a mod-rewrite. Anyway sorry I have strayed a bit from what you were asking there. Have you looked at keywords and description, you should still have unique keywords and descriptions on your pages, although some say not. -
I would suggest having a script that would check what ever you need to be finished off on that particular page and run this using crontab. Depending on what you need to do that might be possible, ie for me if users place an ad on one of my sites and then close the browser i have a script that checks emails are sent if not it will send them.
-
deleting a record through an image button
steveclondon replied to ashrafzia's topic in PHP Coding Help
This is prob just a typo but you have a quote missing on your href at start You just collect it in your handling script by using $_GET then query the database and delete. -
For what you are doing why not download a php email class like the one below. Very easy to use and will put your attachements in no problem. http://phpmailer.sourceforge.net/
-
I haven't even moved on to version 5 yet. Do you think I should?
-
must admit not a problem that I have had. Just out of interest have you tried sending a mail with no from header. Is this somethng that is specific to your host. In which case contacting them might be the first step. However I have not heard of this happening and perhaps someone else knows more about it.
-
any time a varible is passed through the url with globals on you can use this any where in your script. ie script url: index.php?user=1 you would then access this using $user eg. echo $user. If globals are off which they should be for security you would then need to use this $_GET['user'], eg at the top of you page you would do the following, $user=$_GET['user']. Now all references to $user below would work. It is the same with varibles from forms as well. These now need to be accessed by $_POST['your_varible_name_here']. The best thing to do is to ensure that your test server has globals off and you have all errors and warnings being displayed (set in your php.ini file). Then run the script and read the errors. They should give you line numbers of varibles that are not set. See what they are and where did it get it from then make the changes.
-
an example of some code here that you have will be of some help
-
Trying to move html code through the url and catch it with $_GET
steveclondon replied to Trevors's topic in PHP Coding Help
In this case I would use a $_SESSION or a hidden $_POST field. -
Cookies VS Sessions for Shopping Cart?
steveclondon replied to dragonusthei's topic in PHP Coding Help
well of the two sessions but remember that the user must still have a cookie enabled to store the session id. the alternative is to put the session id then through the url if they do not have cookies set. -
remember that is your check box is not checked there will be no post for that. So if you have a checkbox named : box you would need to if (isset($_POST['box'])) { $value=$_POST['box']; } else { value=NULL; }