Jump to content

punkstar

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by punkstar

  1. Well.....I have a problem.i want to make <div> tag go left and stay left, inside a <td>. this works fine in Firefox, but not in IE (damn those bastards).i have a float attribute on the <div> on the right and I have a position:relative;left:0; on the left <div>.i know i can use <td align="left">. However the align attribute is deprecated, as well as is the <center> ( which was a fav. for me). I need a freekin guru. Can i get crafty with some javascript maybe.( i know, wrong section).i need help. please.

    i have always hated divs :)..this is a prime example why.
  2. once you start using it to communicate with database, you will notice that there really is no better way. its basically as you say it.SELECT ALL FROM USERS WHERE USERNAME = PUNKSTARtranslates in sql to..SELECT * from `users` WHERE `username` = 'punkstar'easy :)SQL is simple compared to PHP because PHP is a progamming language, and SQL is just a standard way to communicate with any (good) databases out there :)*shines*

  3. :)  I am trying to set up a web site for a friend, I need to set it so that you can only reach the main page once you have received a password from the validadator.  I also have to set it so that they can input bank details and make the first page a pop up.Can anybody help me with the codes as I have only just started doing HTML.

    try googling for a thing called a CMS (content managment system). If you are using webhosting with cpanel and fantastico, you will find loads of them in there.Some well known ones are phpnuke and mambo. They will help you make the website you want to make :)
  4. You can actually post to another page by using a php lib called curl, or libcurl.There isn't that much documentation around, and I am a little rusty on it, but ill give it a go :)

    <?php$ch = curl_init();//set the optscurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);curl_setopt($ch, CURLOPT_URL,"http://www.yourwebsite.com/postcatch.php");curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_POSTFIELDS, "var1=var1value&var2=var2value");//result$result = curl_exec($ch);curl_close($ch);?>

    ..now that will actually post the variables over to the page that you set in CURLOPT_URL. There is somemore cool stuff that you can do with curl like letting curl handle its own cookies, dealing with useragents, etc. Once you master curl, you can make a bot for anything or, like you, use it to make post requests on your behalf.There are ofcourse other ways to do it, i believe you can actually do it wish fsockopen()? But do not have much experience with that function.Hope that helps :)

  5. Research the foreach() function as you are dealing with arrays. it makes life a whole lot easier, and php code soo much cleaner :)

    <?php$monday=array('honey pepper chicken','smoked chicken with spinach','pork spare ribs','lamb with peri peri chips','foccacia', 'Avocado Baguette');$tuesday=array('toast','smoked salmon','caesar salad','chips','chicken parmigaina','fried rice');$wednesday=array('pork spare ribs','lamb with peri peri chips','foccacia', 'Avocado Baguette');$thursday=array('chicken parmigaina','fried rice','gourmet italian pizza','honey pepper chicken');$friday=array('fried rice','gourmet italian pizza','honey pepper chicken','smoked chicken with spinach','pork spare ribs');$days=array('Monday'=>$monday,'Tuesday'=>$tuesday,'Wednesday'=>$wednesday,'Thursday'=>$thursday,'Friday'=>$friday);foreach($days as $key => $value){  //as the key we have the weekday, and the value is the array  echo $key."<br />";    foreach($value as $key2 => $value2)  {    //as the $key2 we have the number of the dish, and as $value we have the dish    echo "<input type=\"radio\" value=\"".$value2."\" /> - ".$value2."<br />";  }	echo "<br />";}?>

    I am not too sure if that is what you want to do, but it shows you one possible outcome for your website, or whatever you are doing :)

×
×
  • Create New...