Resend my activation email : Register : Log in 
BCF: Bike Chat Forums


Web development 101

Reply to topic
Bike Chat Forums Index -> The Geek Zone Goto page 1, 2  Next
View previous topic : View next topic  
Author Message

Bubbs
World Chat Champion



Joined: 28 May 2009
Karma :

PostPosted: 19:43 - 21 Jan 2013    Post subject: Web development 101 Reply with quote

I have agreed to build someone a website for a small sum of money, and I may have stretched the truth about my skills a little. My current level is kinda basic, I use dream weaver and am limited to html/CSS.

I agreed to make him a site because its going to push me to learn a bit more about web design, which I find quite interesting.

So with dreamweaver I can make all pages and make it look sleek and very functional, however I have no clue about server side stuff.

So I was hoping for a little guidance

All I want to know is how to get started, e.g creating forms that send the data to me by email, or creating a shopping cart that sends me billing info.. Stuff like that.

Is there a free server that will allow me to practise?

What code will I need to use? I think it's php/MySQL but not 100%?

I'm happy learning from books and the like, just wanted to have a starting point really.

Thanks
____________________
Life begins at the end of your comfort zone.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

woodall57
Could Be A Chat Bot



Joined: 25 Jun 2012
Karma :

PostPosted: 19:44 - 21 Jan 2013    Post subject: Reply with quote

just use a wordpress template Laughing
____________________
cbt:4/7/12 theory:16/7/12 module 1:12/8/12 module 2: ?
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

gfrancisdev
Nova Slayer



Joined: 18 Oct 2012
Karma :

PostPosted: 20:29 - 21 Jan 2013    Post subject: Reply with quote

yup php/mysql, both are pretty easy, just keep the php readable and read up on security/ajax requests/etc

email forms are very simple (google is your friend), shopping cart a bit more complicated as it required authentication/things like that, probably lots of ready-made systems you can just paste in though, usually is for this kind of thing
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

J.M.
World Chat Champion



Joined: 27 Mar 2011
Karma :

PostPosted: 21:15 - 21 Jan 2013    Post subject: Reply with quote

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
View user's profile Send private message You must be logged in to rate posts

Jayy
Mr. Ponzi



Joined: 08 Jun 2009
Karma :

PostPosted: 21:32 - 21 Jan 2013    Post subject: Reply with quote

Use a content management system. If you're going to be building websites, Wordpress or Joomla are where it's at.

You can find Wordpress templates ten to the dozen and customise them to your needs if you know html/css.

You can use plugins for forms, galleries, directories etc.
 Back to top
View user's profile Send private message You must be logged in to rate posts

covent.gardens
World Clap Champion



Joined: 09 Jun 2012
Karma :

PostPosted: 22:55 - 21 Jan 2013    Post subject: Re: Web development 101 Reply with quote

Bubbs wrote:
Is there a free server that will allow me to practise?

You can do it all locally.

https://www.apachefriends.org/en/xampp-windows.html

What's the purpose of your friend's website? If he wants an online shop then that's quite a difficult job for you to take on with no previous experience IMO.
 Back to top
View user's profile Send private message You must be logged in to rate posts

Rogerborg
nimbA



Joined: 26 Oct 2010
Karma :

PostPosted: 10:13 - 22 Jan 2013    Post subject: Reply with quote

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
View user's profile Send private message You must be logged in to rate posts

supZ
World Chat Champion



Joined: 03 Feb 2009
Karma :

PostPosted: 11:01 - 22 Jan 2013    Post subject: Reply with quote

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 Smile
____________________
CBR954RR - Daily toy
CBR600RR - Trackbike
 Back to top
View user's profile Send private message You must be logged in to rate posts

oldpink
World Chat Champion



Joined: 02 Aug 2006
Karma :

PostPosted: 11:47 - 22 Jan 2013    Post subject: Reply with quote

for a shopping cart you can use something like OSCommerce its free and easy to set up
____________________
I have become comfortably numb

Theory & hazard 24-may 2016, CBT 8th June 2016, MOD 1 2nd Aug 2016 Mod 2 2nd-Nov 2016 - Current bike CBR 600 RR
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

P.
Red Rocket



Joined: 14 Feb 2008
Karma :

PostPosted: 12:35 - 22 Jan 2013    Post subject: Reply with quote

I'd be throwing a wordpress setup onto a web server for them... get it looking all sparkly Laughing It is what I did thanks to some smart monkeys on here Thumbs Up
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

Boxing
World Chat Champion



Joined: 13 Mar 2012
Karma :

PostPosted: 13:32 - 22 Jan 2013    Post subject: Reply with quote

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);" Wink

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. Thinking

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
View user's profile Send private message You must be logged in to rate posts

Jayy
Mr. Ponzi



Joined: 08 Jun 2009
Karma :

PostPosted: 14:13 - 22 Jan 2013    Post subject: Reply with quote

oldpink wrote:
for a shopping cart you can use something like OSCommerce its free and easy to set up


Don't use OScommerce, it's not one of the most friendly carts and just slow on development.

Open Cart is brilliant. Magento is good but very complex. Virtuemart for Joomla is a very good cart as well.
 Back to top
View user's profile Send private message You must be logged in to rate posts

Boxing
World Chat Champion



Joined: 13 Mar 2012
Karma :

PostPosted: 14:25 - 22 Jan 2013    Post subject: Reply with quote

ZX Jay wrote:
oldpink wrote:
for a shopping cart you can use something like OSCommerce its free and easy to set up


Don't use OScommerce, it's not one of the most friendly carts and just slow on development.

Open Cart is brilliant. Magento is good but very complex. Virtuemart for Joomla is a very good cart as well.


I've never used Joomla. I remember that exploit in 2008, when hackers were changing the e-mail address it sent the password to and hacking into people Joomla websites. Rolling Eyes
 Back to top
View user's profile Send private message You must be logged in to rate posts

oldpink
World Chat Champion



Joined: 02 Aug 2006
Karma :

PostPosted: 16:30 - 22 Jan 2013    Post subject: Reply with quote

I use both OSCommerce and Geodesic software

I find OSC pretty easy to use and a lot of custom code freely available for it
we did try Joomla / virtuemart a couple of years ago but I didn't like it as I found it harder to tweak the site / pages the way I wanted to
suppose I'm just stuck in my ways as I've used OSC for over 10 years
____________________
I have become comfortably numb

Theory & hazard 24-may 2016, CBT 8th June 2016, MOD 1 2nd Aug 2016 Mod 2 2nd-Nov 2016 - Current bike CBR 600 RR
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

TUG
World Chat Champion



Joined: 12 May 2007
Karma :

PostPosted: 16:46 - 22 Jan 2013    Post subject: Reply with quote

woodall57 wrote:
just use a wordpress template Laughing

if you do this, please use a good one...
____________________
Haz ER-5, innit!
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

yaigi
World Chat Champion



Joined: 28 Jul 2012
Karma :

PostPosted: 16:51 - 22 Jan 2013    Post subject: Reply with quote

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
View user's profile Send private message You must be logged in to rate posts

_Will_
World Chat Champion



Joined: 16 Jan 2006
Karma :

PostPosted: 17:19 - 22 Jan 2013    Post subject: Reply with quote

Rogerborg wrote:
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.


Tis the way according to Tim Ferris, outsource everything then reap the juicy profits and call it business Laughing

On topic, +1 for wordpress, much easier for seo and you have the added bonus of them being able to edit it themselves (cms) so when it begins to fuck you off maintaining it theres less hassle to offload Wink
____________________
Past -Honda qr50 | 2004 Peugeot Tkr s 50|
| 1996 Yamaha XJ600s Diversion|
| 2005|Kawasaki Z750s | | 2006 Yamaha FZ6 Fazer |
|| 1999 Cbr1100xx Blackbird ||
||| 2000 Kawasaki Zx12R ||| (|2009 Street Triple R |) // 2004 Honda Hornet Streetfighter \\|=| 2000 BMW R1100S |=| ------ My Bikepics page ------
Suffering Bike Withdrawal.
 Back to top
View user's profile Send private message Send e-mail Visit poster's website You must be logged in to rate posts

J.M.
World Chat Champion



Joined: 27 Mar 2011
Karma :

PostPosted: 17:57 - 22 Jan 2013    Post subject: Reply with quote

MikeTyson wrote:
Not got a clue if that is deemed as safe in terms of security though. Thinking


Not really. You want htmlentities for displaying content on the page and MySQL prepared statements to stop SQL Injection.
____________________
2004 R1 & 2018 XSR900
 Back to top
View user's profile Send private message You must be logged in to rate posts

ScaredyCat
World Chat Champion



Joined: 19 May 2012
Karma :

PostPosted: 19:55 - 22 Jan 2013    Post subject: Reply with quote

Here are a couple of ebooks to help you on your way...

The ultimate beginner's guide to HTML, CSS, JavaScript, PHP and MySQL

https://books.openlibra.com/pdf/the-web-book.pdf

Beginning Ajax with PHP

https://it-ebooks.info/go.php?id=1030-1358884411-290fef48667755bc692a2e09a36c4972


Andy
____________________
Honda CBF125 ➝ NC700X
Honda CBF125 ↳ Speed Triple
 Back to top
View user's profile Send private message You must be logged in to rate posts

Jayy
Mr. Ponzi



Joined: 08 Jun 2009
Karma :

PostPosted: 20:50 - 22 Jan 2013    Post subject: Reply with quote

oldpink wrote:
I use both OSCommerce and Geodesic software

I find OSC pretty easy to use and a lot of custom code freely available for it
we did try Joomla / virtuemart a couple of years ago but I didn't like it as I found it harder to tweak the site / pages the way I wanted to
suppose I'm just stuck in my ways as I've used OSC for over 10 years


About the same amount of time I used it before fucking it off. I use Open Cart mostly these days.

Magento is very good.
 Back to top
View user's profile Send private message You must be logged in to rate posts

oldpink
World Chat Champion



Joined: 02 Aug 2006
Karma :

PostPosted: 21:04 - 22 Jan 2013    Post subject: Reply with quote

I'll have a look at open cart
I am coming up against restrictions with OSC that are not easily solved
I need multiple shop fronts with one cart, OSC 3 can just about do it but it doesn't support a lot of custom code /DB mods that I have implemented on my V2.3 based site
____________________
I have become comfortably numb

Theory & hazard 24-may 2016, CBT 8th June 2016, MOD 1 2nd Aug 2016 Mod 2 2nd-Nov 2016 - Current bike CBR 600 RR
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

Jayy
Mr. Ponzi



Joined: 08 Jun 2009
Karma :

PostPosted: 22:06 - 22 Jan 2013    Post subject: Reply with quote

Open Cart has the ability to run multiple stores. What problems are you having with OSC?

I used OSC for the better part of 10 years but 2.3 was just being released as I moved away from it. Stuff in 2.2ms2 that should have been out of the box was just missing.

Common one was attribute stock control/quantity. It had no way of tracking stock of attributes and if you have say a clothing company, taking stock of how many sizes have been sold is important.

The fact that most of the contributors were writing poor add ons, instructions in broken English and so on, I just moved well away from it.

I develop 90% in Joomla 2.5 now. Will move to Joomla 3.0 later in the year when more devs update their components/plugins/mods.
 Back to top
View user's profile Send private message You must be logged in to rate posts

oldpink
World Chat Champion



Joined: 02 Aug 2006
Karma :

PostPosted: 22:29 - 22 Jan 2013    Post subject: Reply with quote

I had various issues like multiple images not working with my bulk uploader
same for an additional fields in the product description not being read from the DB when downloading the info

its becoming too disjointed as most hacks don't take into consideration other commonly used contributions
and having to custom code them into my site to get them to work properly

don't get me wrong its doing the job I want just now but I've reached boundary's that I can not get past (multi store front) without having to resort to almost re writing every page
and as you say no great improvement since 2.2ms2 though 2.3 was a lot better
but just more of a tidy up than new version and 3 isn't supported well enough for me to make the change
as I'd loose a lot of my current features like the custom search that I wrote to include the product extra field data
____________________
I have become comfortably numb

Theory & hazard 24-may 2016, CBT 8th June 2016, MOD 1 2nd Aug 2016 Mod 2 2nd-Nov 2016 - Current bike CBR 600 RR
 Back to top
View user's profile Send private message Visit poster's website You must be logged in to rate posts

Jayy
Mr. Ponzi



Joined: 08 Jun 2009
Karma :

PostPosted: 22:36 - 22 Jan 2013    Post subject: Reply with quote

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
View user's profile Send private message You must be logged in to rate posts

oldpink
World Chat Champion



Joined: 02 Aug 2006
Karma :

PostPosted: 23:38 - 22 Jan 2013    Post subject: Reply with quote

will it run on Xampp ??
that was one thing I liked about OSC (lazy c**t can't be assed looking it up)
____________________
I have become comfortably numb

Theory & hazard 24-may 2016, CBT 8th June 2016, MOD 1 2nd Aug 2016 Mod 2 2nd-Nov 2016 - Current bike CBR 600 RR
 Back to top
View user's profile Send private message Visit poster's website 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?
  Display posts from previous:   
This page may contain affiliate links, which means we may earn a small commission if a visitor clicks through and makes a purchase. By clicking on an affiliate link, you accept that third-party cookies will be set.

Post new topic   Reply to topic    Bike Chat Forums Index -> The Geek Zone All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Read the Terms of Use! - Powered by phpBB © phpBB Group
 

Debug Mode: ON - Server: birks (www) - Page Generation Time: 0.11 Sec - Server Load: 1.05 - MySQL Queries: 14 - Page Size: 136.06 Kb