pocobueno1388
Members-
Posts
3,369 -
Joined
-
Last visited
Never
Everything posted by pocobueno1388
-
[SOLVED] Passing values to constuctor in Object oriented?
pocobueno1388 replied to snowman15's topic in PHP Coding Help
<?php function __construct($unit,$weight) { $this-> $units = $unit; $this-> $weight = $weight; } ?> Should be <?php function __construct($unit,$weight) { $this->units = $unit; $this->weight = $weight; } ?> -
Could you post the code you have? If you are having trouble getting started, there a plenty of tutorials out there.
-
Yes, you need to store the information in a database. If you have no experience with a database, I would recommend reading some tutorials on it before you even go any further with this project. There are actually tutorials on it at the site your already using. http://www.tizag.com/mysqlTutorial/
-
This should do it <?php if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_array($result )) { $row_class = ($row_count % 2) ? $class1 : $class2; $id = $row['id']; $manu = $row['manufacturer']; $mod = $row['model']; $colour = $row['colour']; $whole = $row['wholesale_price']; $retail = $row['retail_price']; $quan = $row['quantity']; ?> do html stuff here <?php // Add 1 to the row count $row_count++; } } else { echo "No Results"; } ?>
-
If you want the new drop down to appear automatically when they select a value for the first one, then yes, you will have to resort to JavaScript (not Java).
-
http://www.tizag.com/mysqlTutorial/mysqlquery.php http://www.tizag.com/mysqlTutorial/
-
Displaying database information in columns
pocobueno1388 replied to Wardy_7's topic in PHP Coding Help
Take a look at this post http://www.phpfreaks.com/forums/index.php/topic,95426.0.html -
[SOLVED] using bakspace cannot link back to previous page
pocobueno1388 replied to angelsRock's topic in PHP Coding Help
They could, if there browser supports that. I'm not sure if there are any that don't. For a good web page, I would put a back button if it's necessary. -
Will this update 1 row or all matching rows?
pocobueno1388 replied to cooldude832's topic in PHP Coding Help
As I said before, it will update ALL rows with a matching where clause. Does that answer your question? -
[SOLVED] using bakspace cannot link back to previous page
pocobueno1388 replied to angelsRock's topic in PHP Coding Help
If you want to link to the previous page, do this <?php echo "<a href='{$_SERVER['HTTP_REFERER']}'>Previous Page</a>"; ?> -
[SOLVED] using bakspace cannot link back to previous page
pocobueno1388 replied to angelsRock's topic in PHP Coding Help
No, thats wrong. $_SERVER['HTTP_REFERER'] will give you the last page. -
[SOLVED] using bakspace cannot link back to previous page
pocobueno1388 replied to angelsRock's topic in PHP Coding Help
How to you use "backspace" to link back to your previous page? Your going to have to explain more, and maybe give us some code to look at. -
Well...they pressed "solved", so it must have been.
-
Teng - Yours didn't work for me either. This worked for me <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> Welcome! - Powered By: Pure cP</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="incs/Style.css" rel="stylesheet" type="text/css" /> </head> <body bgcolor="#FFFFFF" style="margin:0px;"> <table id="Table_01" style="width: 1001; height: 1201;" border="0" cellpadding="0" cellspacing="0"> <tr> <td rowspan="41" style="background-image:url(images/demo_01.gif)" width="72"></td> <td colspan="3" rowspan="8"> <img src="images/demo_02.gif" width="180" height="66" alt="" /></td> <td colspan="6"> <img src="images/demo_03.gif" width="136" height="4" alt="" /></td> <td rowspan="3"> <img src="images/demo_04.gif" width="55" height="21" alt="" /></td> <td rowspan="8"> <img src="images/demo_05.gif" width="129" height="66" alt="" /></td> <td colspan="6" rowspan="2"> <img src="images/demo_06.gif" width="345" height="10" alt="" /></td> <td rowspan="8"> <img src="images/demo_07.gif" width="11" height="66" alt="" /></td> <td rowspan="41"> <img src="images/demo_08.gif" width="72" height="1200" alt="" /></td> <td> <img src="images/spacer.gif" width="1" height="4" alt="" /></td> </tr> <tr> <td colspan="5" rowspan="5"> <img src="images/demo_09.gif" width="50" height="40" alt="" /></td> <td rowspan="2"> <img src="images/demo_10.gif" width="86" height="17" alt="" /></td> <td> <img src="images/spacer.gif" width="1" height="6" alt="" /></td> </tr> <tr> <td colspan="6" rowspan="5"> <img src="images/demo_11.gif" width="345" height="47" alt="" /></td> <td> <img src="images/spacer.gif" width="1" height="11" alt="" /></td> </tr> <tr> <td> <img src="images/demo_12.gif" width="86" height="6" alt="" /></td> <td rowspan="2"> <img src="images/demo_13.gif" width="55" height="21" alt="" /></td> <td> <img src="images/spacer.gif" width="1" height="6" alt="" /></td> </tr> <tr> <td rowspan="2"> <img src="images/demo_14.gif" width="86" height="17" alt="" /></td> <td> <img src="images/spacer.gif" width="1" height="15" alt="" /></td> </tr> <tr> <td rowspan="3"> <img src="images/demo_15.gif" width="55" height="24" alt="" /></td> <td> <img src="images/spacer.gif" width="1" height="2" alt="" /></td> </tr> <tr> <td colspan="6" rowspan="2"> <img src="images/demo_16.gif" width="136" height="22" alt="" /></td> <td> <img src="images/spacer.gif" width="1" height="13" alt="" /></td> </tr> <tr> <td colspan="6"> <img src="images/demo_17.gif" width="345" height="9" alt="" /></td> <td> <img src="images/spacer.gif" width="1" height="9" alt="" /></td> </tr> <tr> <td colspan="18"> <img src="images/demo_18.gif" width="856" height="159" alt="" /></td> <td> <img src="images/spacer.gif" width="1" height="159" alt="" /></td> </tr> <tr> <td colspan="18"> <img src="images/demo_19.gif" width="856" height="60" alt="" /></td> <td> <img src="images/spacer.gif" width="1" height="60" alt="" /></td> </tr> <tr> <td colspan="5" rowspan="30" height="100%" style="background-image:url(images/demo_67.gif)" valign="top"> </td> <td rowspan="30"> <img src="images/demo_21.gif" width="1" height="878" alt="" /></td> <td colspan="9"> <img src="images/demo_22.gif" width="422" height="25" alt="" /></td> <td rowspan="30"> <img src="images/demo_23.gif" width="1" height="878" alt="" /></td> <td colspan="2" rowspan="30" style="background-image:url(images/demo_67.gif)" valign="top"> </td> <td> <img src="images/spacer.gif" width="1" height="25" alt="" /></td> </tr> <tr> <td colspan="9" rowspan="29" style="background-image:url(images/demo_65.gif)" valign="top"> <table align="center"><tr><td> </td><td> <div align="center" style="width:100%; display:block;"> <table align="center"> <tr> <td colspan="3"> <div align='center'>Welcome to the user section Pat Herlihy!</div></td> </tr> <tr> <td> <img border="0" src="http://www.pure-cp.com/beta/images/icons/profile.gif" width="100" height="89" /></td> <td> <img border="0" src="http://www.pure-cp.com/beta/images/icons/demos.gif" width="100" height="89" /></td> <td> <img border="0" src="http://www.pure-cp.com/beta/images/icons/downloads.gif" width="100" height="89" /></td> </tr> <tr> <td> <img border="0" src="http://www.pure-cp.com/beta/images/icons/gallery.gif" width="100" height="89" /></td> <td> <img border="0" src="http://www.pure-cp.com/beta/images/icons/media.gif" width="100" height="89" /></td> <td> <img border="0" src="http://www.pure-cp.com/beta/images/icons/servers.gif" width="100" height="89" /></td> </tr> <tr> <td colspan="3"> <div align="center"><br />You have logged in as an admin. To edit the site, please click below.</div></td> </tr> <tr> <td colspan="3"> <div align="center"> <img border="0" src="http://www.pure-cp.com/beta/images/icons/admin.gif" width="100" height="89" /></div></td> </tr> </table> </div> </td><td> </td></tr></table></td> <td> <img src="images/spacer.gif" width="1" height="14" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="7" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="69" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="3" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="5" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="9" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="2" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="23" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="2" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="92" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="16" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="25" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="26" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="20" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="7" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="25" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="30" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="25" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="39" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="40" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="18" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="18" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="18" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="18" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="18" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="57" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="1" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="36" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="1" height="190" alt="" /></td> </tr> <tr> <td colspan="18"> <map name="FPMap0"> <area href="" shape="rect" coords="779, 0, 855, 36"> </map> <img src="images/demo_68.gif" width="856" height="37" alt="" usemap="#FPMap0" border="0" /></td> <td> <img src="images/spacer.gif" width="1" height="37" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="72" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="6" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="50" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="124" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="29" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="7" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="1" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="10" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="3" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="86" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="55" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="129" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="10" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="49" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="70" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="10" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="1" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="205" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="11" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="72" height="1" alt="" /></td> <td></td> </tr> </table> </body> </html> I changed line 114. I added "align='center'" as an attribute to the table.
-
Will this update 1 row or all matching rows?
pocobueno1388 replied to cooldude832's topic in PHP Coding Help
Well, it will do exactly what it says in the WHERE clause. So anywhere "creatorID" equals $id, "Approved" will be set to 0. -
Will this update 1 row or all matching rows?
pocobueno1388 replied to cooldude832's topic in PHP Coding Help
It would update all the rows where creatorID is equal to $id... -
It aligns fine for me when I use the code.
-
Put a die statement at the end of the query. mysql_query("INSERT INTO `pcp_users` (username,password,email,display,name,description,age,dob,country,location,interests,website,aim,msn,icq,yim,games) VALUES ('$username','$password','$email','$dname','$name','$info','$age','$dob','$country','$location','$interests','$website','$aim','$msn','$icq','$yim','$games')") or die(mysql_error());
-
<h1></h1> basically changes the size of the font. <h1> would be the biggest, and the bigger the number after the 'h', the smaller the font. Your first question kinda got cut off. I think the HTML got executed instead of being posted as text. Put the tags in between [/code.][./code] without the dots. You should be able to easily find these answers on google. Go search for a basic HTML tutorial.
-
Could you post your code?
-
[SOLVED] Question about DATE() .... Hmmmm
pocobueno1388 replied to bri0987's topic in PHP Coding Help
This should do it. <?php $new_date = date ('F j, Y', strtotime ("$date + 10 days")); echo $new_date; ?> -
Try <?php $getNums = mysql_query("SELECT MAX(id) as max, MIN(id) as min FROM bible"); $row = mysql_fetch_assoc($getNums); $max = $row['max'] - 10; $min = $row['min']; $rand = rand($min, $max); $stop = $rand + 10; $result = mysql_query("SELECT * FROM bible LIMIT $rand, $stop"); // WHERE catid <> 'TBP' $i = 0; while($myrow = mysql_fetch_array($result)){ $title = $myrow['book'].' '.$myrow['chapter'].' : '.$myrow['verse'].'<br /> '.$myrow['text']; echo $title; if ($i == 9) break; echo "<br />"; echo "<br />"; $i++; } ?>
-
Okay, I see. <?php $getNums = mysql_query("SELECT MAX(id) as max, MIN(id) as min FROM bible"); $row = mysql_fetch_assoc($getNums); $max = $row['max'] - 10; $min = $row['min']; $rand = rand($min, $max); $stop = $rand + 10; $result = mysql_query("SELECT * FROM bible LIMIT $rand, $stop"); // WHERE catid <> 'TBP' while($myrow = mysql_fetch_array($result)){ $title = $myrow['book'].' '.$myrow['chapter'].' : '.$myrow['verse'].'<br /> '.$myrow['text']; echo $title; echo "<br />"; echo "<br />"; } ?> Give that a try...
-
Rotating Alogrthim to link data between 2 sql tables
pocobueno1388 replied to cooldude832's topic in PHP Coding Help
The function uniqid() creates a random unique ID depending on the time. It will never generate the same id. www.php.net/uniqid I'm not sure if that will be of use or not. -
You have "LIMIT 1" in your query, that means it's only going to display one row. Change that to "LIMIT 10".