Everything posted by FoxIII
-
How to insert form data into two tables
Thank you for the responses. I have changed the code you suggested and also for the other table too. I have also removed the single quotes from the NULL entries and I am still only getting one table populated. I am not getting any errors and it does display "Data inserted." on the page when it's finished.
-
How to insert form data into two tables
I guess the code would be helpful! lol. When the file is called, it runs through the code and echos out the "Data Inserted!" line which is what's causing me problems as I can't find out what's going wrong. <?php // Connect to Database mysql_connect("***", "***", "***") or die(mysql_error()); echo "Connected to MySQL"; mysql_select_db("djmacdon") or die(mysql_error()); echo "Connected to Database"; // Insert Data into the Person Table $PersonType = $_POST["PersonType"]; $Forename = $_POST["Forename"]; $MiddleName = $_POST["MiddleName"]; $Surname = $_POST["Surname"]; $Address1 = $_POST["Address1"]; $Address2 = $_POST["Address2"]; $City = $_POST["City"]; $County = $_POST["County"]; $PostCode = $_POST["PostCode"]; $Telephone = $_POST["Telephone"]; $LAddress1 = $_POST["LAddress1"]; $LAddress2 = $_POST["LAddress2"]; $LCity = $_POST["LCity"]; $LCounty = $_POST["LCounty"]; $LPostCode = $_POST["LPostCode"]; $LDescription = $_POST["LDescription"]; $query2 = "INSERT INTO Person (Person_id, PersonType, Forename, MiddleName, Surname, Address1, Address2, City, County, PostCode, Telephone) VALUES ('NULL', '$PersonType', '$Forename', '$MiddleName', '$Surname', '$Address1', '$Address2', '$City', '$County', '$PostCode', '$Telephone')"; $result2 = mysql_query($query2) or die(mysql_error); // Insert Data into the Location Table $query3 = "INSERT INTO Location (Location_id, LocationType, Address1, Address2, City, County, PostCode, Description) VALUES ('NULL', 'NULL', '$LAddress1', $LAddress2', '$LCity', '$LCounty', '$LPostCode', '$LDescription')"; $result3 = mysql_query($query3) or die(mysql_error); echo "Data Inserted!"; ?>
-
How to insert form data into two tables
Hi all, I am having a hair-ripping moment. I have a form where I want some of the information stored in one database and some in another. Currently I can insert data into one table fine and with no problems but as soon as I add the code to add into an additional table, the first table is populated, but the second is not and no errors are displayed to inform me of any problems. I am attempting to populate both tables with separate INSERT statements and I have compared the two for any typos or errors but there are none. I have searched through google, but there is nothing that seems useful or understandable. I would really be grateful if anyone can help. If anyone needs any other information, just let me know. TIA
-
Good IE Emulator anybody?
Firefox has a good add-on called IE Tab Plus. I've found it good enough to use without having to resort to loading IE.
-
What to learn for an own CMS program?
If you move the location of an include file to a different location. For example from 'list/list.php' to 'include/list.php' then you will have to change the location in all files that reference to that file otherwise they will not be able to find it. It will be best to have one 'structure' that makes sense and stick with it.
-
Website appears incorrectly in ie06
A lot of people will say not to worry about designing for IE6. Just make sure it works for IE7+ and, all the others too.
-
To '/' at end of Meta Tag, or not ?
As mentioned above, it depends on the DOCTYPE you are using, but if you want to find out which you should use, try with and without and then validate it.
-
Design in Doubt
Don't delete it! I think it is really good. It is calming on the eyes and looks like when you have it finished, it will have a nice, easy navigable feel to it. I certainly think it is of a professional standard.
-
CSS Stylesheet not pulling into html
Try using relative paths rather than absolute paths. This will also help when you want to move the website around.
-
What size page to design?
Another website about the 'fold' is Iampaddy. It's interesting to see a comment about the 960 grid system. I'll take a look at the 970!
-
CV - PDF
Not sure about actually designing it, but you can get the Adobe print driver which will allow you to print it directly to a pdf file.
-
Too many blogs?
The number of blogs is not really an issue I think. No one ever complained that there were too many written books out there. It's just nice that there are plenty of original blogs out there that people can choose from based on their own personal views and preferences. But, yes, as mentioned above, there are certainly problems with those blogs that are just set up to hash from others with the view to try and make money.
-
help me float divs please!
Have a look at this article. It shows the various properties including float with examples. Very useful.
-
A Footer
Just for info, you have the stylesheet being loaded twice in the header. Also, I don't think you need to have two footers. You seem to have one inside of another. Just stick with one. #footer { width: 100%; height: 50px; margin: 0px; padding: 0px;
-
What program?
I used to use N++ until I came across Komodo. I'm still on windows, but just checked, and they have it for mac too! Best of all it's free! You can grab it at ActiveState
-
Are .info names good to invest in?
I can't see anything wrong with doing that. However, remember that the average user considers .info domains to contain information and not to be used for selling (I remember seeing a survey result stating such). Obviously you could use advertising, but the general thinking is, just that, for information. That's not to say you can't use it for whatever you want. I have found that people are generally happy with using .info's, even to the point that it is all they use. When they were first released and for years after, people were worried that search engines would not take them seriously due to their cost, and treating them as 'spammy' sites. However, this has been proved wrong. Search engines treat them the same as .com's. I would say look out for the renewal costs though. Sometimes they can jump right up and become fairly expensive to do this! Hope that helps.
-
Javascript not running when flash is around
Thank you mteam! That worked perfectly. In total awe now! It always amazes me how people can actually work this stuff out. I just sit there with a blank expression on my face wondering what the hell I've got myself into. heh. Thanks again!
-
Javascript not running when flash is around
Apologies. It was something I was trying which I forgot to take out once I realised it did not work. Now taken out.
-
Javascript not running when flash is around
Right. I should've asked this here first rather than get an immature response from (apparently) the most popular web design forum. hmmm. Anyhoo, what I have is a piece of javascript which rotates some addresses in a div on my pages. This works on all pages except for the main page which I am guessing is because of the flash rotator/lightbox which is only on that page. Example can be seen at My link Could anyone help me in solving this problem? Or pointing me in the right direction? TIA
-
Layout Issue with Chrome
Hey all. I am having an issue with a layout on a website but have no idea where to even start looking for the problem as it seems a bit random. To explain: I have 3 divs in a container div. Menu on the left, content in the centre and scrolling addresses on the right. The layout displays perfectly in firefox and IE, but runs into problems in chrome. Basically, whenever it is refreshed, it randomly decides to either display it in the correct position or directly under the menu div for no apparent reason. If anyone could help or point out where the problem lies, I would be most grateful. You can see the page in question here. TIA
-
Cannot left align p tag
Well, if anything is going to go wrong, it's gonna go wrong for me. Thank you both very much for your help. Really appreciate it. Just hope I can get my head around it eventually. Looks like no relaxing over xmas for me.
-
Cannot left align p tag
Obviously nothing on their servers is allowed to be viewed outside of the campus. Makes sense now why everyone on my course keeps coming in on their days off. hehe. Anyhoo, Ricrod, the link is exactly how I want it! Currently mine starts the paragraph on the right of the images, level with the top one. Dizi, I tried that code too (and cleared the cache) but it didn't make any difference to the layout.
-
Cannot left align p tag
I have used the changes you have suggested, but I still get the bottom paragraph sitting on the right-hand side of the images. Could it be the resolution of my monitor being too large? Currently running at 1920x1080. I have uploaded it to the university servers if you want to see it in action: http://www.cems.uwe.ac.uk/~djmacdon/wdp/project1/
-
Cannot left align p tag
I have just suddenly realised why I am having problems with the layout and you two aren't. I have been testing this in IE7 But it does work perfectly in IE8 Unfortunately for me, I have to design it so it matches the layout between FF and IE7 (something to do with making sure we understand the IE bugs due to there still being such a high percentage of people that still use it - personally, after this assignment I shall be boycotting IE7 and lower and getting everyone either to upgrade or onto FF!)
-
Cannot left align p tag
Here you go: /* ---------------------------------------------------------------------------- Web Design Principles - Assignment 1 Daniel MacDonald - 09022238 09 December 2010 ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- Divs have been indented to show parent/child structure within the overall design --------------------------------------------------------------------------*/ body { font: bold 14px arial, san-serif; margin: 0px auto 0px auto; background-image: url('../images/ff_xii_background.png'); background-repeat: no-repeat; background-attachment: fixed; background-position: center; } /* Create equal margin around images ----------------------------------*/ img { margin: 3.5% 3.5% 3.5% 3.5%; border-color: #303030; } /* ---------------------------------------------------------------------------- Tooltip code courtesy of http://www.dynamicdrive.com/style/ --------------------------------------------------------------------------*/ .thumbnail { position: relative; z-index: 0; } .thumbnail:hover { background-color: transparent; z-index: 50; } .thumbnail span { position: absolute; background-color: #bdcce9; padding: 5px; left: -1000px; border: 1px solid #8494b4; visibility: hidden; color: white; text-decoration: none; width: 160px; \width: 170px; } .thumbnail span img { border-width: 0; padding: 2px; } .thumbnail:hover span { visibility: visible; top: -90px; left: 7px; } #wrapper { width: 75%; min-width: 900px; margin-left: auto; margin-right: auto; } #header { height: 98px; background: center; background-image: url('../images/ff_xii_header.png'); background-repeat: no-repeat; } #footer { float: left; padding: 10px 0 10px 0; width: 100%; background: #303030; color: #fff; line-height: 0.8em; text-align: center; } /* Start of menu -------------------------------------------------------------*/ #menu { height: 10px; background: #303030; color: #fff; margin: 0px; padding: 10px; } #menu ul { margin: 0px; padding: 0px; } #menu ul li { display: block; padding: 0px; float: left; text-align: left; margin-right: 2em; } #menu li a { color: #fff; text-decoration: none; line-height: 0.8em; display: block; } #menu li a:hover { color: #8181b7; } /* End of menu ---------------------------------------------------------------*/ #content { background: #fff; opacity: 0.95; float: left; font: 14px verdana, arial; color: #000; width: 100%; } #leftColumn { float: left; width: 200px; padding: 10px; \width: 240px; font: 10px verdana, arial; } #rightColumn p { margin: 0 0 0 200px; padding: 0 5px 0 5px; width: auto; text-align: left; } .imageBox { text-align: center; } #leftImageColumn { width: 33%; float: left; } #centerImageColumn { width: 33%; float: left; } #rightImageColumn { width: 33%; float: left; } .vcard, .form { padding: 0.5em; background: #ccc; border: 1px solid black; margin: 5em 2em 0 2em; font-size: 90%; } /* Start of lightbox ---------------------------------------------------------*/ #lightbox { background-color: #eee; padding: 10px; border-bottom: 2px solid #666; border-right: 2px solid #666; } #lightboxDetails { font-size: 0.8em; padding-top: 0.4em; } #lightboxCaption { float: left; } #keyboardMsg { float: right; } #closeButton { top: 5px; right: 5px; } #lightbox img { border: none; clear: both; } #overlay img { border: none; } #overlay { background-image: url('images/overlay.png'); } * html #overlay { background-color: #333; background-color: transparent; background-image: url('blank.gif'); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="overlay.png", sizingMethod="scale"); } /* End of lightbox -----------------------------------------------------------*/ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- Title: Web Design Principles - Assignment 1 Code: UFIE84-20-2 Author: Daniel MacDonald - 09022238 Dated: 28 November 2010 URL: http://www.cems.uwe.ac.uk/~djmacon/wdp/project1 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="includes/style.css" /> <!--[if IE]> <link rel=stylesheet" type="text/css" href="inclues/style.css" /> <![endif] --> <script type="text/javascript" src="includes/lightbox.js"></script> <script type="text/javascript" src="includes/crumb.js"></script> <title>Home Page</title> </head> <body> <div id="wrapper"> <div id="header"> </div> <div id="menu"> <ul> <li><a href="#">Home<br /></a></li> <li><a href="about.html">About FFXIII<br /></a></li> <li><a href="form.html">Contact Form<br /></a></li> <li><a href="contact.html">Contact Details<br /></a></li> <li><a href="layout.html">Layout<br /></a></li> </ul> </div> <div id="content"> <div id="leftColumn"> <script type="text/javascript"> <!-- breadcrumbs(); --> </script> <br /><br /><br /> <!-- Script courtesy of http://twitter.com --> <script type="text/javascript" src="http://widgets.twimg.com/j/2/widget.js"></script> <script type="text/javascript"> new TWTR.Widget({ version: 2, type: 'search', search: 'final fantasy xiii', interval: 6000, title: 'News relating to...', subject: 'Final Fantasy XIII', width: '220', height: 385, theme: { shell: { background: '#bdcce9', color: '#ffffff' }, tweets: { background: '#ffffff', color: '#444444', links: '#1985b5' } }, features: { scrollbar: true, loop: true, live: false, hashtags: true, timestamp: true, avatars: true, toptweets: true, behavior: 'default' } }).render().start(); </script> </div> <div id="rightColumn"> <!--[if IE]> <br /> <![endif]--> <p>Final Fantasy XIII was officially released on the 9th March 2010 and sold 1,321,000 copies in the first 24 hours in the UK & US. Bringing the total number of sales for the complete Final Fantasy series to 7.5 million copies worldwide since the first Final Fantasy in December 1987.</p> <br /><br /> <div class="imageBox"> <div id="leftImageColumn"> <a class="thumbnail" href="images/lightbox/ff_01_main.jpg" rel="lightbox"><span>The mighty steed, Sleipnir...</span><img src="images/lightbox/ff_01_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_02_main.jpg" rel="lightbox"><span>Serah Farron fights...</span><img src="images/lightbox/ff_02_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_03_main.jpg" rel="lightbox"><span>Flan. Not just for desert...</span><img src="images/lightbox/ff_03_thumb.jpg" alt="FFXIII" /></a><br /> </div> <div id="centerImageColumn"> <a class="thumbnail" href="images/lightbox/ff_04_main.jpg" rel="lightbox"><span>The armoured vehicle Brynhildr...</span><img src="images/lightbox/ff_04_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_05_main.jpg" rel="lightbox"><span>In mid fight...</span><img src="images/lightbox/ff_05_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_06_main.jpg" rel="lightbox"><span>Thundara - lightening strikes...!</span><img src="images/lightbox/ff_06_thumb.jpg" alt="FFXIII" /></a><br /> </div> <div id="rightImageColumn"> <a class="thumbnail" href="images/lightbox/ff_07_main.jpg" rel="lightbox"><span>Snow & Lightning - ready to fight...</span><img src="images/lightbox/ff_07_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_08_main.jpg" rel="lightbox"><span>Snow finds the power...</span><img src="images/lightbox/ff_08_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_09_main.jpg" rel="lightbox"><span>Cid Raines - 'The Cavelry'...</span><img src="images/lightbox/ff_09_thumb.jpg" alt="FFXIII" /></a> </div> </div> <p>Final Fantasy XIII is set within the world of Pulse. Central to the story is Cocoon, an artificial sphere that floats above Pulse's surface and is ruled by the Sanctum, a theocratic government. The worlds are controlled by fal'Cie (, mechanical beings with godlike power, each based around a crystal and created by a god-like figure called the Maker. The Cocoon fal'Cie are additionally responsible for keeping Cocoon floating, as well as providing light and water.</p> <!--[if IE]> <br /><br /> <![endif]--> <p>Each fal'Cie handles a specific task. The fal'Cie have the capability of marking the humans, also created by the Maker, that live in Pulse and Cocoon as their servants. These servants, called l'Cie, are branded with a symbol representing either Pulse or Cocoon, and are additionally given a "Focus", a task to complete. If the l'Cie complete their task in time, they are transformed to crystal and gain eternal life (as said in the legend); otherwise they become mindless monsters called Cie'th. Five hundred years before the events of the game, two l'Cie named Oerba Dia Vanille and Oerba Yun Fang initiated a conflict that would later be known as the War of Transgression. This quarrel grew to catastrophic proportions, causing a war between Cocoon and Pulse, and ripped a large hole in Cocoon in the process.</p> </div> </div> <div id="footer"> 2010 - 09022238 - Daniel MacDonald </div> </div> </body> </html>