|
Author |
Message |
Bubbs |
This post is not being displayed .
|
 Bubbs World Chat Champion

Joined: 28 May 2009 Karma :  
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
woodall57 |
This post is not being displayed .
|
 woodall57 Could Be A Chat Bot

Joined: 25 Jun 2012 Karma :     
|
 Posted: 19:44 - 21 Jan 2013 Post subject: |
 |
|
just use a wordpress template  ____________________ cbt:4/7/12 theory:16/7/12 module 1:12/8/12 module 2: ? |
|
Back to top |
|
You must be logged in to rate posts |
|
 |
gfrancisdev |
This post is not being displayed .
|
 gfrancisdev Nova Slayer

Joined: 18 Oct 2012 Karma :    
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
J.M. |
This post is not being displayed .
|
 J.M. World Chat Champion

Joined: 27 Mar 2011 Karma :    
|
 Posted: 21:15 - 21 Jan 2013 Post subject: |
 |
|
PHP/MySQL is about it for a basic server side application.
With forms you can do it one of two ways, both decided in the HTML. You can have a POST form or a GET form. This is just the way that the data is sent to the server.
A GET request forms a request like this: example.com/script.php?firstname=john&lastname=doe
A POST request forms a request like this: example.com/script.php
The data in a POST request is invisible to the user (unless they are really looking to find it).
This then affects what you need to do to retrieve the data in PHP.
In the script.php you may have something like this for GET:
Code: | <?php
$firstname = $_GET['firstname'];
$lastname = $_GET['lastname'];
echo "Hello $firstname $lastname!";
?>
|
(Note how there the variables are actually nested inside of the string. In PHP the double quotation mark allows variables to be placed inside of it. A single quotation mark doesn't, which I'll show in the next example).
You may have something like this for POST:
Code: | <?php
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
echo 'Hello '.$firstname.' '.$lastname.'!';
?> |
It's also very important to actually validate input before processing it, especially in to a database.
That covers how to get data in to your PHP script.
Everything else can be easily found by Googling exactly what you want to do. 99% of the time someone else will have wanted to do it to and there will be some code that you can copy and paste which will work a treat for you.
If you have any specific questions/queries/problems, feel free to drop me a PM. ____________________ 2004 R1 & 2018 XSR900 |
|
Back to top |
|
You must be logged in to rate posts |
|
 |
Jayy |
This post is not being displayed .
|
 Jayy Mr. Ponzi
Joined: 08 Jun 2009 Karma :  
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
covent.gardens |
This post is not being displayed .
|
 covent.gardens World Clap Champion

Joined: 09 Jun 2012 Karma :     
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
Rogerborg |
This post is not being displayed .
|
 Rogerborg nimbA

Joined: 26 Oct 2010 Karma :    
|
 Posted: 10:13 - 22 Jan 2013 Post subject: |
 |
|
I don't wish to be a dick unnecessarily, but you're now doing this professionally, and the professional way is to farm it out to some Chinese or Indian subcontractor. ____________________ Biking is 1/20th as dangerous as horse riding.
GONE: HN125-8, LF-250B, GPz 305, GPZ 500S, Burgman 400 // RIDING: F650GS (800 twin), Royal Enfield Bullet Electra 500 AVL, Ninja 250R because racebike |
|
Back to top |
|
You must be logged in to rate posts |
|
 |
supZ |
This post is not being displayed .
|
 supZ World Chat Champion

Joined: 03 Feb 2009 Karma :   
|
 Posted: 11:01 - 22 Jan 2013 Post subject: |
 |
|
you could make a basic site layout with html/css, have a mysql db of products, access it through php and use a google shopping cart or similar for actual purchases.
saves fiddling around with ssl certificates and secure carts etc..
forms have already been dicussed. in ye olde days people used to use perl scripts (a lot of servers still load them as standard) but these days just use whatever scripting language you're using and deal with it that way.
there are plenty of options out there. just look up php mail scripts, form scripts etc..
https://www.w3schools.com/
has some great little examples and tutorials to look at
gl  ____________________ CBR954RR - Daily toy
CBR600RR - Trackbike |
|
Back to top |
|
You must be logged in to rate posts |
|
 |
oldpink |
This post is not being displayed .
|
 oldpink World Chat Champion

Joined: 02 Aug 2006 Karma :   
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
P. |
This post is not being displayed .
|
 P. Red Rocket
Joined: 14 Feb 2008 Karma :  
|
 Posted: 12:35 - 22 Jan 2013 Post subject: |
 |
|
I'd be throwing a wordpress setup onto a web server for them... get it looking all sparkly It is what I did thanks to some smart monkeys on here  |
|
Back to top |
|
You must be logged in to rate posts |
|
 |
Boxing |
This post is not being displayed .
|
 Boxing World Chat Champion
Joined: 13 Mar 2012 Karma :   
|
 Posted: 13:32 - 22 Jan 2013 Post subject: |
 |
|
PHP and MySQL. Easy, if you have the basic grasp of PHP.
Or have loads of time to read up and learn.
Anyway as for security just a case of getting the data and using "mysql_real_escape_string($var);"
Basic form:
index.php:
Code: |
<form action="postindex.php" method="post">
First name:<br>
<input type="text" name="firstname"><br><br>
Second name:<br>
<input type="text" name="secondname"><br><br>
<input type="submit" value="Go">
</form>
|
Now to grab that data on the "postindex.php" page:
Code: |
<?php
if (!isset($_POST['firstname']) || !isset($_POST['seconname'])) {
die("<p style=\"color: red; font-weight: bold;\">Unexpected error!</p><br>\n");
}
$firstname = $_POST['firstname'];
$secondname = $_POST['secondname'];
// Stop SQL injections
mysql_real_escape_string($firstname);
mysql_real_escape_string($secondname);
if (strlen($firstname) < 1) {
die("<p style=\"color: red; font-weight: bold;\">You left the first name field empty!</p><br>\n");
} elseif (strlen($secondname) < 1) {
die("<p style=\"color: red; font-weight: bold;\">You left the second name field empty!</p><br>\n");
}
// Assuming you're connected up to your SQL sever here's how to place the data into the DB.
$insert_data_query = mysql_query("INSERT INTO `yourtable` (firstname, lastname) VALUES ('$firstname', '$lastname')") or die(mysql_error());
echo "<p style=\"color: green; font-weight: bold;\">Welcome to the site ".$firstname." ".$secondname."</p><br>\n";
?>
|
Not got a clue if that is deemed as safe in terms of security though.
As for a shopping cart. You need to know your stuff, a login and registration would be needed and if you're using credit cards, you really need to secure the site, last thing you want is credit cards being leaked by hackers.
This will help:
https://ca.php.net/manual/en/index.php |
|
Back to top |
|
You must be logged in to rate posts |
|
 |
Jayy |
This post is not being displayed .
|
 Jayy Mr. Ponzi
Joined: 08 Jun 2009 Karma :  
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
Boxing |
This post is not being displayed .
|
 Boxing World Chat Champion
Joined: 13 Mar 2012 Karma :   
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
oldpink |
This post is not being displayed .
|
 oldpink World Chat Champion

Joined: 02 Aug 2006 Karma :   
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
TUG |
This post is not being displayed .
|
 TUG World Chat Champion
Joined: 12 May 2007 Karma :  
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
yaigi |
This post is not being displayed .
|
 yaigi World Chat Champion

Joined: 28 Jul 2012 Karma :   
|
 Posted: 16:51 - 22 Jan 2013 Post subject: |
 |
|
Lots of good advice here about CMS system, using PHP/MySQL etc. so I won't repeat all that, I'll just throw a recommendation for a good shopping cart into the mix, we used this on a couple of sites and it's pretty good!
https://www.cubecart.com/ ____________________ What would you do in life, if you knew you could not fail?
Currently own - Fazer 600, 2000, Red. (But no riding as baby on board atm) |
|
Back to top |
|
You must be logged in to rate posts |
|
 |
_Will_ |
This post is not being displayed .
|
 _Will_ World Chat Champion
Joined: 16 Jan 2006 Karma :  
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
J.M. |
This post is not being displayed .
|
 J.M. World Chat Champion

Joined: 27 Mar 2011 Karma :    
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
ScaredyCat |
This post is not being displayed .
|
 ScaredyCat World Chat Champion

Joined: 19 May 2012 Karma :   
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
Jayy |
This post is not being displayed .
|
 Jayy Mr. Ponzi
Joined: 08 Jun 2009 Karma :  
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
oldpink |
This post is not being displayed .
|
 oldpink World Chat Champion

Joined: 02 Aug 2006 Karma :   
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
Jayy |
This post is not being displayed .
|
 Jayy Mr. Ponzi
Joined: 08 Jun 2009 Karma :  
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
oldpink |
This post is not being displayed .
|
 oldpink World Chat Champion

Joined: 02 Aug 2006 Karma :   
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
Jayy |
This post is not being displayed .
|
 Jayy Mr. Ponzi
Joined: 08 Jun 2009 Karma :  
|
 Posted: 22:36 - 22 Jan 2013 Post subject: |
 |
|
Exactly the kind of stuff I would come across and just got fed up of it, especially the contributions not taking in to account other popular ones. You would have to use the likes of Winmerge and compare code and do it like that, taking hours to get multiple hacks working together.
https://www.opencart.com/index.php?route=extension/extension
Get a fresh install of OC up on your server and try it out, so glad I ditched OSC a few years back. |
|
Back to top |
|
You must be logged in to rate posts |
|
 |
oldpink |
This post is not being displayed .
|
 oldpink World Chat Champion

Joined: 02 Aug 2006 Karma :   
|
|
Back to top |
|
You must be logged in to rate posts |
|
 |
Old Thread Alert!
The last post was made 12 years, 137 days ago. Instead of replying here, would creating a new thread be more useful? |
 |
|
|