We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,745 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

add php file in index.html

Hi team,

I have a index.html file and a login php plugins(Click Here

But am not sure how to include it in Index.html script.

May the question is very silly. But,I just started learning about web development. I know the basics but practical wise no experience.

Please advice the steps.

Thanks in advance!!

4
Contributors
7
Replies
3 Days
Discussion Span
7 Months Ago
Last Updated
8
Views
sidd.
Light Poster
37 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Hi :)

I don't know if exactly that you're waiting for...

I suggest you to create an index.php

<?php

 // Insert your session (session must be first)
 session_start();

 // Insert your include file
 include("./yourFile.php");

...

?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    ...
</head>
<body>
    ...
</body>

<!-- Insert your jquery code here -->

</html>

Hope help you :/

mano7859
Newbie Poster
22 posts since May 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

@sidd

May the question is very silly. But,I just started learning about web development. I know the basics but practical wise no experience.

It's pretty simple. Is that index.html is your home page or you want that index.html to be the file that store that login?

Usually you want to put those codes in a folder that can link it to the index.html.

Bu my question is what is the index.html and did you create DB?

LastMitch
Industrious Poster
4,118 posts since Mar 2012
Reputation Points: 132
Solved Threads: 334
Skill Endorsements: 45

It's pretty simple. Is that index.html is your home page or you want that index.html to be the file that store that login?

I advise you to create an index.php for your login page not an html file
(like i explained)

Usually you want to put those codes in a folder that can link it to the index.html.

use include('../yourcodeFile.php")

did you create DB?

Yes it's necessary because you need to check informations.
For example:

In your form:
<input type="text" name="log" value="nickname">
<input type="password" name="pass" value="mypassword">

In your database:
nickname must be equal to mypassword

hope help u :/

mano7859
Newbie Poster
22 posts since May 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

@mano7859

Those questions are towards sidd not you.

I know how to create a login.

LastMitch
Industrious Poster
4,118 posts since Mar 2012
Reputation Points: 132
Solved Threads: 334
Skill Endorsements: 45

Lol i'm sorry I'm tired and confused :)

mano7859
Newbie Poster
22 posts since May 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

@mano7859

It's Alright! I get it. =)

LastMitch
Industrious Poster
4,118 posts since Mar 2012
Reputation Points: 132
Solved Threads: 334
Skill Endorsements: 45

Hi Mitch and Mano,
Thanks for your advice!!

Index.html page is my home page and i want to call the php file from there.
As suggested, i have changed it to index.php.
But the login box that i am using is throwing hell lot of errors, rest of the page is fine.
I will try to look into the errors, If cant resolve it, will come back.

Thanks again!!

sidd.
Light Poster
37 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0973 seconds using 2.68MB