help with php gui - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

help with php gui

jackfusionjackfusion Posts: 1Member
Hello all

I thing this is going to be very complex.

I have a Some PHP and HTML files I would like to put together but, there is things that need to happen. I forgot the MySQL database set up. I will first post the script and code for the PHP and HTML.

PHP Script

[code]

1
2
3 Getting Data out of the Database
4
5
6

The Daily News

7
11


12
13 Search:
14
15
16
17


18 <?php
19 /* This program gets news items from the database */
20 $db = mysql_connect("localhost", "root", "c705m5p");
21 mysql_select_db("php", $db);
22 /* if ($orderby == 'date'):
23 $sql = "select * from news order by 'date'";
24 elseif ($orderby == 'author'):
25 $sql = "select * from news order by 'author_name'";
26 elseif ($orderby == 'heading'):
27 $sql = "select * from news order by 'heading'";
28 else
29 else: */
30 if (isset($submit)):
31 $sql = "select * from list where Title = '$Title'";
32 endif;
33 $sql = "select * from list";
34 $result = mysql_query($sql);
35 while ($row = mysql_fetch_array($result)) {
36 print("<tr>");
37 printf("%s
",
38 $row["heading"]);
39 printf("By: %s
",
40 $row["author_email"], $row["author_name"]);
41 printf("Posted: %s
",
42 $row["date"]);
43 printf("%s
",
44 $row["body"]);
45 }
46 ?>
47
48
49

[/code]

HTML Code

[code]

1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3
4
5 Untitled Document
6
7
8
9 body {
10 behavior:url("csshover.htc");
11 }
12
13 * {
14 font-family:arial,tahoma,verdana,helvetica;
15 font-size:12px;
16 }
17
18 /* the menu */
19
20 ul,li,a {
21 display:block;
22 margin:0;
23 padding:0;
24 border:0;
25 }
26
27 ul {
28 width:250px;
29 border:1px solid #9d9da1;
30 background:white;
31 list-style:none;
32 }
33
34 li {
35 position:relative;
36 padding:1px;
37 z-index:9;
38 }
39 li.folder ul {
40 position:absolute;
41 width: 160px;
42 left:250px; /* IE */
43 top:5px;
44 }
45 div#descrip
46 {
47 left:
48 }
49 li.folder>ul { left:250px; } /* others */
50
51 a {
52 padding:2px;
53 border:1px solid white;
54 text-decoration:none;
55 color:gray;
56 font-weight:bold;
57 width:100%; /* IE */
58 }
59 li>a { width:auto; } /* others */
60
61 /* regular hovers */
62
63 a:hover {
64 border-color:gray;
65 background-color:#bbb7c7;
66 color:black;
67 }
68 li.folder a:hover {
69 background-color:#bbb7c7;
70 }
71
72 /* hovers with specificity */
73
74 li.folder:hover { z-index:10; }
75
76 ul ul, li:hover ul ul {
77 display:none;
78 }
79
80 li:hover ul, li:hover li:hover ul {
81 display:block;
82 }
83
84
85
86
87
88
89 109
110
111

[/code]

The MySQL heading columns are Title, See, Page 1, Page 2, Page 3, Online Catalogue, Full Text - Online - Infotrax, Full Text - Online - CBCA, CBCA Dates, Absorbed, Microfilm, ISSN and Electronic.

What I would like to do is put the php into the html so when the search is done it will display the results like so.

http://kennyleitz.googlepages.com/iemenu.html


Comments

  • IDKIDK Posts: 1,784Member
    : I have a Some PHP and HTML files I would like to put together but, there is things that need to happen. I forgot the MySQL database set up. I will first post the script and code for the PHP and HTML.
    :
    :
    : What I would like to do is put the php into the html so when the search is done it will display the results like so.
    :
    : http://kennyleitz.googlepages.com/iemenu.html
    :
    :
    :

    Do you want the PHP code to be in the HTML code or what?
    That's impossible.

    But you can try the PHP code once, and then copy the result to a HTLM, that will be almost the same, exept it isn't dynamic.
    You can make it dynamic again with a script on the server.
Sign In or Register to comment.