wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
Where does $SQL get set to here: [code]$result = mysql_query("INSERT INTO classes (dayname, day, month, year, title, description, cost, location, contact) VALUES ('$dayname', '$day', '$month', '$year', '$title', '$description', '$cost', '$location', '$contact')"); if (!mysql_query($SQL,$con)) { die('Error: ' . mysql_error()); }[/code]
-
I have found the problem. It is to do with this: [code]#content { width: 420px; height:400px; float:left; margin: 0 20px; }[/code] I notice [i]height:400px;[/i] That sets the content div to a fixed height of 400px. The content will flow out side of the div if the content get greater than 400px, as the content will not resize. This results in the footer not moving and the content flows over the div. What you should do is either remove [i]height:400px;[/i] or use [i]min-height:400px;[/i]. if you use the latter you may need to use CSS hacks as IE6 and lower doesnt support min-height. It'll also affect other browsers too.
-
Aliases isnt to do with PHP, but with SQL queries. This is where I learnt [url=http://www.w3schools.com/sql/sql_alias.asp]aliases[/url]. Aliases allow you to setup a sort of shortcut for the table name or column you're returning.
-
Umm, I see you got rid of my aliases :) I did that so you dont have to type the table name out all the time. Glad you got it all working now.
-
Goto your profile, by clicking the [url=http://www.phpfreaks.com/forums/index.php?action=profile]Profile link[/url] in the menu below the PHPFreaks header. Then click the link of the left side that says [url=http://www.phpfreaks.com/forums/index.php?action=profile;u=37621;sa=showPosts]Show Posts[/url] You should see all the posts you have made since you been joined here. Note if any of your posts haas been deleted they will not be shown.
-
PHP error, I need help Pls. (I'm New to PHP)
wildteen88 replied to [email protected]'s topic in PHP Coding Help
Where does $signin variable come from? Prehaps use this instead: [code=php:0]if (isset($signin) && !empty($signin)) {[/code] -
You had double quote (maked in red) in your query. Which was breaking the string. And thus you got the error. [quote]$query="INSERT INTO roster VALUES([color=red][b]"[/b][/color],'$first','$last','$number','$position','$height','$weight','$shoots','$dob')";[/quote] use this instead: [code=php:0]$query="INSERT INTO roster VALUES(NULL,'$first','$last','$number','$position','$height','$weight','$shoots','$dob')";[/code]
-
Try this: [code]<table> <tr> <th>Item Description</th> <th>Category</th> <th>Edit</th> <th>Delete</th> </tr> <?php include 'connections/config.php'; include 'connections/dbconn.php'; $sql = "SELECT tl.link_id, tl.link_title, tl.link_desc, tl.category_id, tl.link_display, cats.category_name FROM tbl_links tl, categories cats WHERE tl.category_id = cats.category_name ORDER BY tl.link_title"; $result = mysql_query($sql) or die("Uable perform query at this time<br />" . mysql_error()); if(mysql_num_rows($result) > 1) { $i = 0; while($result_ar = mysql_fetch_assoc($result)) { ?> <tr <?php echo (($i%2 == 1) ? "class='tablerow2'" : "class='tablerow1'"); ?>> <td><?php echo $result_ar['link_title']; ?></td> <td><?php echo $result_ar['category_name']; ?></td> <td class="button"> <a href="edit_link_detail.php?ID=<?php echo $result_ar['link_id']; ?>" title="Edit This Link">Edit</a> </td> <td class="button"> <a href="delete_link.php?ID=<?php echo $result_ar['link_id']; ?>" title="Delete This Link">Delete</a> </td> </tr> <?php $i++; } } else { echo <<<HTML <tr class="tablerow2"> <td style="color: red; font-weight: bold; text-align: center;">Sorry no results found</td> </tr> HTML; } ?> </table>[/code]
-
Simplified BBphp question on tag matching...
wildteen88 replied to yungbloodreborn's topic in Regex Help
How are you passing your tags at the moment? I allows parse my tags in pairs: [code]<?php function bbcode($txt) { // bbcodes $bbcodes = array( "|\[b\](.+)\[/b\]|is", "|\[u\](.+)\[/u\]|is", "|\[i\](.+)\[/i\]|is" ); // html $replace = array( "<strong>$1</strong>", "<u>$1</u>", "<em>$1</em>" ); $txt = preg_replace($bbcodes, $replace, $txt); return nl2br($txt); } $str = "[b]hey[/b] a [u][i]BBCode parser[/i][/u]! "; $str = bbcode($str); echo $str; ?>[/code] That way if there are any stray [nobbc][b], [i], [u] or whatever tags are not closed[/nobbc] they can be seen. Then the author can remove the unmatched tag. or you can add code on to the function which remove any non matched tags. -
PHP 5.1.6 and Apache 2.2.3
wildteen88 replied to Jay2391's topic in PHP Installation and Configuration
Yeah downgrad Apache to Apache2.0.x I forgot to mention that. -
Standard Install: No ini files
wildteen88 replied to lwoods's topic in PHP Installation and Configuration
What did you use to install PHP. If you used the installer then download the zip package and extract the contents to where you installed PHP to. However the installer should come with ini files. Got to start search and search for for php.ini see what Windows finds. -
Try this: [code=php:0]$conn = mysql_connect($dbhost . ':' . $dbport, $dbuser, $dbpwd);[/code]
-
I think I know what you mean my friend told me about this a few months or so ago. I cant remeber the name of it. But if I rememeber it mimics the Max OSX menu on the bottom. I'll see if I can dig it up.
-
huh? $_SERVER['HTTP_REFERER'] if you want to get the referring url If not then could you explain what you're trying to do in more detail
-
Parameter Count and Query issues **SOLVED**
wildteen88 replied to scottybwoy's topic in PHP Coding Help
Its your SQL query thats the error. Check that you are using the correct mssql syntax for the following query: SELECT level FROM users WHERE uNAME = $user Prehaps it should be: SELECT `level` FROM `users` WHERE `uNAME`='$user' -
Register Global - in search of a replacement
wildteen88 replied to MCrosbie's topic in PHP Coding Help
Hay C-V MCrosbie was already doing that. MCrosbie used $_GET to access the variables from the url as said in the first post of the thread by the OP. Thats why every skipped step B :D -
Register Global - in search of a replacement
wildteen88 replied to MCrosbie's topic in PHP Coding Help
You should use isset. Dont use GET/POST on its own when checking whether they exist or not: [code=php:0]$variable1 = (isset($_GET['variable1']) && !empty($_GET['variable1'])) ? $_GET['variable1'] : "";[/code] -
Thread closed. YOu already asked this in the correct forum which is the PHP Installation forum. Please do not double post threads around the forum thank you.
-
Parameter Count and Query issues **SOLVED**
wildteen88 replied to scottybwoy's topic in PHP Coding Help
You want to run mssql_query not mssql_result! You cannot pass an SQL query to mssql_result. mssql_results grabs the results returned from the query you passed through mssql_query. Also no need to do two sql queries to get the level. Just use one: [code]<?php function userLevel($user) { $this->appCon(); $sql = mssql_query("SELECT level FROM users WHERE uNAME = $user"); $user_level = mssql_fetch_assoc($sql); return $user_level['level']; } ?>[/code] -
In Opera/IE, 3px bottom-padding is added to images
wildteen88 replied to esgarrouth19's topic in CSS Help
I see you're using a list for those images. I wouldnt use a list. I'd do this: [code]<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank" title="Valid CSS!" rel="nofollow"><img src="http://images.frohsenwebdesign.com/buttons/css.gif" alt="Valid CSS!" width="80" height="15" border="0" /></a> <a href="http://validator.w3.org/check?uri=referer" target="_blank" title="Valid XHTML 1.0!" rel="nofollow"><img src="http://images.frohsenwebdesign.com/buttons/xhtml.gif" alt="Valid XHTML 1.0!" width="80" height="15" border="0" /></a> <a href="http://www.getthunderbird.com/" title="Get Thunderbird!"><img src="/images/buttons/thunderbird.gif" alt="Get Thunderbird!" width="80" height="15" border="0" /></a>[/code] If you want to center them vertically add equal padding to the top and bottom of #footer. -
I moved [i][nobbc]<div id="top_banner"></div>[/nobbc][/i] out of the left_inner_shell div and into the outer shell dive. Then I floated the left inner shell left and the right inner shell to the right. I then reduced the with of left and right inner shells by 5 pixels each which produces a 10pixel gap between the two columns. This will allow the two columns to have a bit of breathing space. If you set the left and right col to 500px and 200px respectively there will be no space for the cols to move and thus the smallest column will move down underneath the biggest column. Note: If add any padding to left or the right of the two columns you'll have to change the columns left or right columns width accordingly. For example say you added 5 pixels of padding to the left and right of the inner left shell you'll have to reduce the width of the inner shell by 10px. As padding gets added on to the width, same applies for margin. Total width = width + (padding + margin + border)
-
I use Thunderbird for all my email. However I have to use Outlook to read my MSN emails. Thunderbird doesnt support the hotmail mail box protocol or summit when I last checked. :(
-
[quote author=dbrimlow link=topic=106306.msg441259#msg441259 date=1159215385] For anyone interested in the solution that finally worked, all I needed to do was tell IE to use a "word wrap" and force a new line as follows: $description = wordwrap($description, 50, "\n"); What had been happening was that a long url was being "auto" wraped by Outlook. That's all. Everything else was fine. [/quote]You dont tell IE to wordwarap but PHP. PHP sends the output back to the browser.
-
You'll probably want to use a flat file database. There are plenty of "Counter tutorials/scripts" out there. Heres one [url=http://www.spoono.com/php/tutorials/tutorial.php?id=4]here[/url]