Tutorial-building Dynamic Websites

Welcome. Please Login, Register, Or Activate! 
type your username and password to login
Date: November 21, 2009, 06:07 AM
430281 members and 297409 Topics
Latest Member: Emmanuelpee
Nairaland [Nigerian Forum] Home Help Search Who is currently online? Login Register
Nairaland Forum  |  Technology  |  Webmasters (Moderators: OmniPotens, yawa-ti-de)  |  Tutorial-building Dynamic Websites
Pages: (1) (2) (3) (4) (5) Go Down Send this topic Notify of replies
Author Topic: Tutorial-building Dynamic Websites  (Read 6357 views)
webdezzi (m)
Re: Tutorial-building Dynamic Websites
« #64 on: January 05, 2009, 06:15 PM »

Now, lets include our conn.php file into our readNews.php page so that we can start using the variables in conn.php to fetch content out of the database

just add this code to the top of the readNews.php's html code

Quote
<?php
include("conn.php");
mysql_select_db('tut99',$conn);
$result = mysql_query("SELECT * FROM m_news");

?>

Let us break the code above down to pieces

include() is an inbuilt php function that allows you to loads anyfile's into the current file you are coding,
the file's variables and functions can also be access in the current file you are coding.

This means we can use the $conn variable that has been declared in the previous conn.php file

mysql_select_db('tut99',$conn);

here we are selecting the database we want to use, lets say we have another databasewe will like to use with a different connection setting, we therefore use the new database's connection variable(assuming we created one) instead of $conn

$result = mysql_query("SELECT * FROM m_news");
this line executes the database query, just as SQL stands for structured query language
this function accepts one parameter and the parameter has to be an sql query.

the query above is "SELECT * FROM m_news"

so it stores the returned value into the $result variable we created.

Note: in case you are used to javascript's var this, var that
php does not require us declaring variable before using them.

we can just declare a variable while using it
e.g

$seun="nairaland owner";

javascript instead will say

var seun;
seun=nairaland;

Thats by the way.

Now the reason we are including this php code at the top of our html code is because we want the server to process it before the html, that way, we already have the data we need to insert into the html part.

Next, we will push out the result so that the world can see
webdezzi (m)
Re: Tutorial-building Dynamic Websites
« #65 on: January 05, 2009, 07:31 PM »

right now, my readNews.php says

Quote
<?php
include("conn.php");
mysql_select_db('tut99',$conn);
$result = mysql_query("SELECT * FROM m_news");

?><html>
<head>
<title>Building Dynamic Website Tutorial</title>
</head>
<body>
<table width="777" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#333333">
  <tr>
    <td bgcolor="#FFCC66"><h1><br>
     &nbsp; MYFIRSTWEBSITE.COM<br>
      <br>
    </h1></td>
  </tr>
  <tr>
    <td><br><p>&nbsp;
      Please take time to read what i have for you in the news section<br>
      &nbsp; <a href="#"><strong>Click here to get news update</strong></a></p>
    <p>&nbsp;</p>
        <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p></td>
  </tr>
  <tr>
    <td bgcolor="#666666"><div align="center" style="font-size: 12px; color: #CCCCCC;">HOME | ABOUT | NEWS </div></td>
  </tr>
</table>
</body></html>

now let us add the php line that will print our result out, but before we do that,
Let us create an html table to put our result into
and remove the link that says "click here to read news update"

now you should have this

Quote
<?php
include("conn.php");
mysql_select_db('tut99',$conn);
$result = mysql_query("SELECT * FROM m_news");

?><html>
<head>
<title>Building Dynamic Website Tutorial</title>
</head>
<body>
<table width="777" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#333333">
  <tr>
    <td bgcolor="#FFCC66"><h1><br>
     &nbsp; MYFIRSTWEBSITE.COM<br>
      <br>
    </h1></td>
  </tr>
  <tr>
    <td><br>
    <p><strong>&nbsp;
      The news
      &nbsp;</strong>
     <?php while ($row = mysql_fetch_assoc($result)) {?>

    <table width="528" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
          <tr>
            <td bgcolor="#FFFFFF"><strong>Headline:<?php echo $row['headlinex'];?></strong></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF">Main Story:<?php echo $row['storyx'];?></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF">Posted on <?php echo $row['datex']?> by <?php echo $row['posterx'];?></td>
          </tr>
        </table>
      <?php }?>

        <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p></td>
  </tr>
  <tr>
    <td bgcolor="#666666"><div align="center" style="font-size: 12px; color: #CCCCCC;">HOME | ABOUT | NEWS </div></td>
  </tr>
</table>
</body></html>

Now take note of that bold area

you can do your best to know what is happening there, leaving all till 2mrw when i will be explaining what we did.
Lakeside (m)
Re: Tutorial-building Dynamic Websites
« #66 on: January 10, 2009, 12:57 PM »

@webdezzi
guy yu are really trying,
may God bless your efforts, hope we can see more people will to help each other without requesting for money.
but webdezzi, this could be my first post in this topic but i bet yu have been going tru this post for some time now. i`m having problems creating a database. using phpmyadmin in wampserver. i mean when i click on phpmyadmin from the quick lunch(status icon) of wampserver i get this error message.
and sometimes it writes "phpmyadmin error"


* errorpage.jpg (159.94 KB, 1280x800 )
*dhtml (m)
Re: Tutorial-building Dynamic Websites
« #67 on: January 11, 2009, 07:09 AM »

@Lakeside, I too have been following this thread but have been silent.
Ehm, the problem you are having is that
you are running IIS (Microsoft Internet Information Server) 7.0 on Windows Vista simulataneusly
with wamp server. Usually the first server to start takes up the whole job.
When you attempted to launch the phpmyadmin, it was IIS that took up the task
you have to decided which server you want to use.
If it is IIS, then install you want to use (let us know),
if it is your wamp server, then you need to stop your IIS server,
then restart your wamp server.

To disable your IIS 7.0, go to your control panel -> Administrative Tools -> Internet Information Services (IIS) Manager

Then on the right pane of the manager, you should see the Stop button.

Then restart your wamp server.



else


you can copy the phpmyadmin from your wamp server into the IIS c:\inetpub\www\root and run it like that on
your IIS provided you have installed php and mysql on your IIS. That one is a lengthy topic that i do not wish
to discuss and especially not on this thread, you can send me an email on www.contact.mwebng.net if you
wish to know how to setup phpmyadmin, php and mysql on your internet information server.
Lakeside (m)
Re: Tutorial-building Dynamic Websites
« #68 on: January 12, 2009, 11:15 AM »

@Dhtml
thanks guy but i think i`ve already tried that but still getting some kind of error,


* phperr.jpg (116.34 KB, 1280x800 )
*dhtml (m)
Re: Tutorial-building Dynamic Websites
« #69 on: January 12, 2009, 09:02 PM »

That is because your IIS is not fully configured. The problem with IIS is that to fully configure it to work well with php/mysql is not as easy at it seems. That one may take me an entire thread to explain how it will work with Zend, databse and all, best thing is to disable it when you have to use php/mysql and use your wamp server instead.
However if you are able to meet a programmer in person (not me - i am tied up right now) who can do the config for you then that will be it. If you can meet me online (i suspect you are using vista) - i can help you by using Remote Desktop Connection where i can get to see your desktop and possibly control it and solve your problem without having to really be there.
You can watchout for me when i am online (usually between 8pm and 12 pm everyday) - at the very least.
Lakeside (m)
Re: Tutorial-building Dynamic Websites
« #70 on: January 13, 2009, 09:03 AM »

thanks, how i wish i could be online at that time but i`m only online evryday when i`m at work which is between 7am-7pm mondays to friday.
but i think you could still do me some help by expalining how i can disable IIS totally and use wampserver.
i really need to solve that part of it to continue with the thread,
i appreciate your efforts,
Lakeside (m)
Re: Tutorial-building Dynamic Websites
« #71 on: January 13, 2009, 09:09 AM »

my yahoo id is justlakeside
webdezzi (m)
Re: Tutorial-building Dynamic Websites
« #72 on: January 14, 2009, 12:09 PM »

sorry guys, i was taken away by facebook

about your last error, Thats because mysqli extension has been disabled or not installed.
A quick way around this is you uninstall ALL you have installed so far including wamp, then re-install wamp

that should fix the error.
wamp should configure all that for you.
Lakeside (m)
Re: Tutorial-building Dynamic Websites
« #73 on: January 14, 2009, 04:54 PM »

@webdezzi
yu are welcome, was wondering when yu`ll be back.
thanks i`ll try dat now,
*dhtml (m)
Re: Tutorial-building Dynamic Websites
« #74 on: January 16, 2009, 05:58 AM »

Reinstalling wamp may work only if you disable your IIS - otherwise u may need to locate your php.ini file- the one your iis is using, look for the line of mysqli.dll or whatever, look at the other dlls and then get the right dll into the folder wherever it may be.
You may copy it from your wamp server if they are the same version.
I cannot give you specific info because i have stopped using IIS and wamp server several years back, i use a locally made server [i decompiled one of the local servers and rebuilt it to suit my own specs - so my server doesnt have a name - and its config is slightly different from wamp, only similarity is - it is apache-based]
webdezzi (m)
Re: Tutorial-building Dynamic Websites
« #75 on: January 16, 2009, 11:36 PM »

@lakeside
Yes, you need to disable ISS or remove it completely from the windows component area(where u installed it from)
Please let us know when this is resolved.

@dhtml
I respect u o

@tutorial. Please bear with me, am just putting things in place so that a project i am working on goes live.

Lakeside (m)
Re: Tutorial-building Dynamic Websites
« #76 on: January 19, 2009, 01:34 PM »

yea men!
thanks guys its working now, i`d to uninstall every dam thing including php5, mysql and wampserver. then i now installed wampserver alone and stop the service of iis components
Lakeside (m)
Re: Tutorial-building Dynamic Websites
« #77 on: January 23, 2009, 03:14 PM »

whats up guys, dont tell me yu have abandoned this thread, dhtml, webdezzi, way unna.
abeg come continue this class oo abeg. na GOD i take beg una.
or can i have yu email addresses.
*dhtml (m)
Re: Tutorial-building Dynamic Websites
« #78 on: January 23, 2009, 05:49 PM »

The only reason why i leave my iis disabled is because of asp.net - good to see that your problem has been solved.
And @webdezzi - keep up the good job - we are here to assist you whenever u need us.
xanadu
Re: Tutorial-building Dynamic Websites
« #79 on: January 23, 2009, 07:02 PM »

Well done guys - very interesting thread. I'm glad you got it working now, @Lakeside.

Just to add a few lines, if I may.

You can run IIS and Wamp on the same server very easily, without having to disable IIS. If for example you do have another website you are hosting on IIS, or some application that requires IIS, you do not need to disable it.

The reason there might seem to be an issue if both Wamp and IIS are installed is this: by default, Apache, which is the web server in Wamp, is set to run on Tcp port 80, the standard http port. IIS of course, also runs its web server on this port by default. So Apache will not run because port 80 is already being used by IIS.

What to do if you do not need or want to turn off IIS is to configure IIS to use another port (say port 81) for its web server :

 - You can go to the properties of IIS (XP, Control Panel-Administrative Tools-Internet Information Server). Right click on the default website, and under the Website tab change the TCP port to 81 (or whatever port number you want to use). Click OK, stop and restart the website (right-click on the default website, click Stop, then Click Start).

This should free port 80 for you to run your site in Apache, leaving IIS still enabled if needed.

If you do need to also run a site using IIS at the same time, simply add the port number at the end of the url for the IIS site, for example 'http://mywebsite:81/index.html'.

Hope this throws some light.


* scr_shot.JPG (38.63 KB, 475x462 )
*dhtml (m)
Re: Tutorial-building Dynamic Websites
« #80 on: January 24, 2009, 06:37 AM »

That is another way of handling it again - the guy seems to be a beginner - that is why i did not wish to bug him with all that.
You will hav to start explainin why http://localhost/index.asp has become http://localhost:81/index.asp ,  but i recommend that he should try this method if he plans to be using IIS in future.

Lakeside (m)
Re: Tutorial-building Dynamic Websites
« #81 on: January 26, 2009, 05:14 PM »

@xanadu
i`m actually using vista but i found my way though, i`ll change it anytime i need such.
@xthml
i`m nt actually a beginner but when i comes to u guys i agree to b a biginner. i actually knw a command from the promt that takes me to were i can change the port number,smeone tot me that, bt i`ve forgotten the command. and i couldnt find my way there since i was using vista and it get complicatedat times, anyway thanks guys i realy appreciate every,

can anyone send me a tutorial,ebook that can teach me how to use dreamweaver. plz i need it. i already knw sm basic html.
i`m really interested in knwing dreamweaver or frontpage. help guys,
*dhtml (m)
Re: Tutorial-building Dynamic Websites
« #82 on: January 27, 2009, 12:32 AM »

I am a beginner too Wink  - webdezzi is the DW guy - I am the NP++ guy
pastorflow
HOW TO INCORPORATE ADSENSE CODE INTO MY BLOG
« #83 on: January 27, 2009, 06:59 AM »




GOOD DAY SIR,

GOD BLESS YOU INDEED FOR THIS GOOD WORK YOU ARE DOING ON THE NET.

HOW DO I INCORPORATE ADSENSE CODE INTO MY BLOG?

SIR I NEED STEP BY STEP INSTRUCTION ON THIS MATTER.

THANKS.


--
 Cheesy[b]


Pastor Wale Ojo
234-8035855876

pastorwaleojo@gmail.com

[/b]
webdezzi (m)
Re: Tutorial-building Dynamic Websites
« #84 on: January 27, 2009, 09:21 AM »

@pastorflow,

login to your adsense account if you have created one, if you havent but have a google account, be it gmail, googletalk etc, you dont have to create another account.
just enable the adsense feature for your current account and u are good to go.

click on the adsense setup in your google account, then click on "AdSense for Content" (i want to believe that is what u want)

then follow the steps u find there, they are there to help u customize adsense.

at the final stage, u should get a source code that look like this

Quote
<script type="text/javascript"><!--
google_ad_client = "pub-3173459592090000";
/* 120x240, created 10/21/08 */
google_ad_slot = "8183650800";
google_ad_width = 120;
google_ad_height = 240;
//-->

</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

just paste that code anywhere on the web page you want it to show up.

One good tip i always give ppl is to use "Include"

Quote
To include the file,
Just save the adsense code in a separate file. make sure nothing else is in it, just the code
then from any page you want it to display, just use your language's include
e.g. for php, it will be <?php include("path_to_adsense_file");?>

this is very very important as, later on, when u need to make changes, you will be editing the adsense file and everything will automatically reflect on every page you may have included it. that way, you dont have to open 50 pages and start making changes (also reduces the changes of u making mistakes in one of those files.)



I think that clears that.


about the 2 services running simultaneously , i am so much in support of dhtml's view. though, you may need to run both services later on,
say u want to test interactions between to websites on your localhost one is ASP based and the other PHP, and you need to exchange data between these websites using just their webpages.
Xanadu's style will do the trick

I am glad Lakeside has this working fine now.
webdezzi (m)
Re: Tutorial-building Dynamic Websites
« #85 on: January 27, 2009, 10:45 AM »

Quote
  <?php while ($row = mysql_fetch_assoc($result)) {?>

    <table width="528" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
          <tr>
            <td bgcolor="#FFFFFF"><strong>Headline:<?php echo $row['headlinex'];?></strong></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF">Main Story:<?php echo $row['storyx'];?></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF">Posted on <?php echo $row['datex']?> by <?php echo $row['posterx'];?></td>
          </tr>
        </table>
      <?php }?>
Now let us analyse whats going on in this little code.

<?php while ($row = mysql_fetch_assoc($result)) {?>

as u already know, we need an open and close tag that tells apache, this is a php business, hand it over to him
and that open and close tag is <?php  some_codes_here   ?>


lets leave while out for a second, lets digest this first

$row = mysql_fetch_assoc($result)

$row is a variable we just created, i mean it does not exist in any of php's standard, we cud have called it $anything
so we are saying mysql_fetch_assoc($result) is equal to our newly created $row

like i said earlier, anything in this "example()" format is called function in PHP, it does perform a function and some function requires that you supply a parameter while others dont

e.g. exit() does a job of terminating any script, -requires not parameter
unlink($parameter) does the job of deleting any file from any directory as long as the file permits it, -requires a parameter which must be a file name
mysql_connect($server, $username, $password, $optional1, $optional2) help connect to mysql database -requires 3 compulsory parameters and 2 optional parameters

so our mysql_fetch_assoc($result) is just a function that fetches the result from our previous query (our query was assigned to $result, remember!)
if you look at it closely, mysql_fetch_assoc() function is not smart enough to read our script to determine what he needs to act on, we had to give him the result so he could do his job on it

it's job is to fetch the result and make them available as an associative array, (not as hard as it sounds)

What is an array
Quote
An array is an ordered map,
e.g. Color=>yellow
Forum => nairaland
Forum =>  (if u cant find me on nairaland, you will find me here)
Cars => toyota camry 2004 model (i have this for sale-http://webdezzi.com/motors)

so associative arrays will be something like this (i stand corrected)

headlinex => "this is headline 1"
headlinex => "this is headline 2"
headlinex => "this is headline 3"
headlinex => "this is headline 4"

that way, we can just iterate or loop over the arrays to echo them out and that is where the "while" come in

while ($row = mysql_fetch_assoc($result)){

we are simply saying, while $row is still being equal to mysql_fetch_assoc($result)
then keep running the code within the curly brackets "{ }" (i will explain why we have just one bracket in one second)

so as long as the while gets evaluated to something other than nothing, it will keep running whatever u have in the curly brackets

Why do we have just one curly bracket {

that is because the other bracket is somewhere at the bottom of the script  <?php }?>

see how we wrapped it in a php tag, Interesting! thats because we want php to use it, remember!
so you see that everything inside these curly braces including the html codes stand a chance of repeating itself if the database returned more than one result set

so if the news in our database is 2, we will end up with 2 tables
5 news means 5 tables.
here is the DYNAMIC table that is capable of showing up many times

Quote
<table width="528" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
          <tr>
            <td bgcolor="#FFFFFF"><strong>Headline:<?php echo $row['headlinex'];?></strong></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF">Main Story:<?php echo $row['storyx'];?></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF">Posted on <?php echo $row['datex']?> by <?php echo $row['posterx'];?></td>
          </tr>
        </table>

look inside the table and u find some php codes right inside it, that may want to be confusing but it is not.
PHP allows its programmers to jump in and out of php at any time, as long as you follow the rules.

here is an examples of how to do this (i have html in bold)

<?php if($dog=$animal) {?> <img src="dog.jpg"> <?php }else{ ?> <img src="human.jpg"> <?php } ?>

see as i opened and closed the php tags, you can actually continue the rest of your php code later on in your script as long as you respect the open and close tags
in this case, i did not use the ";" and thats because it may not be necessary in a situation like this.
so once this executes, you get to see the dog image if the "if" condition evaluates to true, else, you will see a human image
note also that there are restrictions to this. check your php manual for this. php manual is at php.net, look for the documentation link. (I downloaded the .chm version, that way, i dont need the internet in order to know what a particular function requires.)

back to where we stopped

the php code inside the table above will only do the job of displaying the news associatively

next we will build the admin section where we will be adding news so we can see the result of what we have done so far visually.
Hopefully, that will be tomorrow (and sorry for the previous delays)

PLEASE NOTE, if() while() and switch() are not function, they are called constructs.
and also note that you can define your own functions but its name must not be that of any php functions available
so i can define mine function as

function MyfirstFunction()
{
echo "how are you";
}

so my function will be called like this, notice the case sensitivity

MyfirstFunction();

and the result will be

How are you
*dhtml (m)
Re: Tutorial-building Dynamic Websites
« #86 on: January 31, 2009, 08:48 AM »

Ehm, i was wondering if
print<<<end

Would have been better, to prevent repetitive <?php echo $_ROW[]; ?>
end;
webdezzi (m)
Re: Tutorial-building Dynamic Websites
« #87 on: February 07, 2009, 02:02 AM »

We actually want a repetitive result set

it is the news and we want them to still be able to access previous news.

I am away from Lagos and away from my computer.
Busy making arrangement for our upcoming seminar.
*dhtml (m)
Re: Tutorial-building Dynamic Websites
« #88 on: February 07, 2009, 11:17 AM »

i c, i have been very busy too these days, and since i have to help moderate the computers section as well so i spend more time there.
webdezzi (m)
Re: Tutorial-building Dynamic Websites
« #89 on: February 08, 2009, 10:45 PM »

i can see you have loads of tutorials going on, thats nice sharing.

Now let us build the admin area, why now?
because i love the workflow of having data (news) in the database so we can see whats going on at the front end.
webdezzi (m)
Re: Tutorial-building Dynamic Websites
« #90 on: February 08, 2009, 11:01 PM »

Now, let use create a folder in our tutorials folder called "admin"
we shud end up with something like with this image


* www.webdezzi.com.gif (27.8 KB, 665x527 )
webdezzi (m)
Re: Tutorial-building Dynamic Websites
« #91 on: February 08, 2009, 11:20 PM »

this folder shud have an index file which will also be the login page.

so let us create the file and add the form.
any WYSIWYG editor will help in this regard or you can go through ncpat's tutorial

so, here is the code we want to use for the login form, it has been named accordingly
Quote
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Website Administration</title>
</head>

<body>
<form id="login_form" name="login_form" method="post" action="index.php">
  <p>&nbsp;</p>
  <table width="37%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
    <tr>
      <td height="4" colspan="2">&nbsp;</td>
    </tr>
    <tr>
      <td width="39%"><div align="right">Username:&nbsp; </div></td>
      <td width="61%"><div align="left">
        <input name="username" type="text" id="username" />
      </div></td>
    </tr>
    <tr>
      <td height="4" colspan="2"></td>
    </tr>
    <tr>
      <td><div align="right">Password:&nbsp; </div></td>
      <td><div align="left">
        <input name="password" type="text" id="password" />
      </div></td>
    </tr>
    <tr>
      <td height="4" colspan="2"></td>
    </tr>
    <tr>
      <td><div align="right"></div></td>
      <td><div align="left">
        <input type="submit" name="Submit" value="login" />
      </div></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>

</body>
</html>


and this is what it looks like in my browser.


* www.webdezzi.com.gif (14.74 KB, 665x527 )
webdezzi (m)
Re: Tutorial-building Dynamic Websites
« #92 on: February 08, 2009, 11:57 PM »

now, lets secure our admin area

what we will be doing:

we will be comparing what the user supplied with what is in the database.

first we need to create a table in our database for the admin login storage.
in this case, we will have just 1 admin user so let us create a table called "settings"

This is my personal workflow, instead of having a table dedicated to login info
i prefer to store login info in a table i can reuse.

but say we have many users and will need to manage access level (i.e some may have access to some admin feature while such features may be disabled for others)
then i will create a table dedicated to user accounts.

Here is the phpmyadmin generated sql

Quote
CREATE TABLE `tut99`.`settings` (
`settings_name` VARCHAR( 255 ) NOT NULL ,
`first` VARCHAR( 255 ) NOT NULL ,
`second` VARCHAR( 255 ) NULL ,
PRIMARY KEY ( `settings_name` )
) ENGINE = InnoDB

you will notice that i set "second" to NULL
thats because, right now, i dont know what other settings i will be adding apart from the login info. If the settings will be of 1 value, then leaving the second column as NULL means the database will accept the singgle value.

lets ride on you will get it when we get to that stage.

run that query and switch back to your notepad++
webdezzi (m)
Re: Tutorial-building Dynamic Websites
« #93 on: February 09, 2009, 01:27 AM »

we will need a query that looks more like

select  all from settings where settings_name=login and first=username and second=password

we will continue from here
yusufu16
Re: Tutorial-building Dynamic Websites
« #94 on: February 10, 2009, 03:52 PM »

nice work webdezzi please can you send me the complete tutorial to my email: jeturn16@yahoo.com. may God increase your knowledge
dre101 (m)
Re: Tutorial-building Dynamic Websites
« #95 on: February 10, 2009, 08:22 PM »

Wonderful job!
Keep it Up. Smiley
 How To Start An Online Radio Station  Dynamic Web Design Tutorials Ft Javascript,Ajax,DOM,PHP,MySQL...  Nudist Camp Nude Celebrity  Page 2
Pages: (1) (2) (3) (4) (5) Go Up Send Topic to Friend by E-mail Reply 


Sections: Autos/Cars (2) Jobs/Vacancies (2) (3) Career Talk Education General(2) Politics Romance Computers Phones Travel
Sports Fashion Health Religion Celebrities TV/Movies (2) Music/Radio (2) Books Webmasters Programming

Links: Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 Page10

Nairaland is owned by Oluwaseun Osewa. See also: Nairalist Classified Ads
Nairaland Forum | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.