Solved

CSS and PHP Question

Posted on 2013-01-18
3
389 Views
Last Modified: 2013-01-18
I am having issues with my CSS and PHP code.  I will post 2 questions here and once the 1st is answered I will repost the 2nd question.  

1st Question: CSS

In the webpage BookMark_This.html I am trying to put the loginMenu div inside the headerInnerContainer div and right justify it.  As well I am trying to position the registration div below and to the right of  the headerInnerContainer div.  All this is shown in the mockup
BookMark This Mockup.docx attached.

2nd Question PHP
I was using an example on the web from http://www.phpeasystep.com/phptu/6.html as a guide to  writing the login code.  When I try to enter data in to the username and password box I get the following syntax errors:


Notice: Undefined index: member_username in C:\TMA2\Project1\bookmark.php on line 30

Notice: Undefined index: member_password in C:\TMA2\Project1\bookmark.php on line 31

The code for both questions are attached
bookmark.css
bookmark.php
Bookmark.sql
BookMark-This.html
white-wall.png
subtle-grunge.png
BookMark-This-Mockup.docx
0
Comment
Question by:Genus1
3 Comments
 
LVL 16

Assisted Solution

by:Chris Harte
Chris Harte earned 250 total points
ID: 38792891
The php problem is caused by the file bookmark-this.html on line 52

<form method: "post" action= "bookmark.php">

should be an equals not a colon

<form method="post" action= "bookmark.php">
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 250 total points
ID: 38793101
These are almost certainly different issues (and should be two questions) because CSS is a client-side technology and PHP runs on the server.  I'm pretty sure MunterMan is right about the malformed <form> tag.  There may be other issues, but browsers tend to ignore the malformed parts of the HTML, substituting default values instead.  In this case the default values were "GET" for the request type and "current URL" for the action script.

You can have more than one form on a page.  Your programming might be simplified if you used separate forms.  Whenever you see two submit buttons (especially without name attributes) it's worth asking if there should be two forms.

A good tool for validating your HTML is available here:
http://validator.w3.org/

A good tool for data visualization is this function:
http://php.net/manual/en/function.var-dump.php

A good guide to writing a technical question is available here:
http://sscce.org/

All PHP client authentication scripts follow the same design pattern, shown and explained here:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_2391-PHP-login-logout-and-easy-access-control.html
0
 

Author Closing Comment

by:Genus1
ID: 38793961
Great,  I will work through the examples.

Thanks.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now