Jump to content

punkstar

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by punkstar

  1. 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. not if you want a news-ticker, or something like that...<marquee> is deprec now. so browsers will eventually stop supporting it.
  4. punkstar

    password

    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
  5. 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
  6. punkstar

    PHP array iteration

    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...