Jump to content

taquitosensei

Members
  • Posts

    676
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by taquitosensei

  1. you could do something like this <input type='radio' name='radioarray[$roundid]' value='$teamid'> then foreach($POST['radioarray'] as $roundid=>$teamid) { // do you sql here }
  2. you've got extra spaces after the single quotes. (postcode LIKE ' m13%' OR town LIKE ' m13%') vs (postcode LIKE 'm13%' OR town LIKE 'm13%')
  3. In order to redirect using php you'd have to submit the form and then handle the redirect on submission if(isset($_POST['redirect']) && $_POST['redirect']) { header("Location: http://www.google.com"); } or use javascript to redirect window.location = "http://www.google.com/" or you have to submit the form
  4. if(($photoID+1) < mysql_num_rows($result)) { // echo your next code here }
  5. I don't think so at least not without refreshing. php generates the clientside. html + javascript in this case. If shockwave were able to send information to serverside php then you'd have to generate new html + javascript with the updated information.
  6. $count=0; foreach($list as $array) { $count=($array['amount'] > 0)?$count++:$count; }
  7. They're not the same results. SaleDate, SalePrice and Book & Page are different. Just a guess but I'd say you have multiple entries in sale_parcel for each account.
  8. how about if ($r['Something'] == "somethingindb") { echo "blah"; }
  9. you'll have to play around with it but this will give you the architecture of their CPU but doesn't guarantee they're running a 64 bit OS. You'd need a list of architectures and then check against your list to see whether it's 64 or 32 bit. window.navigator.cpuClass
  10. I don't think you can. The user agent is the only way I know of and I don't think it includes that information.
  11. Do you want your servers OS? Or the clients you can get the clients from the User agent. You'd have to use a regular expression to find it. $oslist = array ( // Match user agent string with operating systems 'Windows 3.11' => 'Win16', 'Windows 95' => '(Windows 95)|(Win95)|(Windows_95)', 'Windows 98' => '(Windows 98)|(Win98)', 'Windows 2000' => '(Windows NT 5.0)|(Windows 2000)', 'Windows XP' => '(Windows NT 5.1)|(Windows XP)', 'Windows Server 2003' => '(Windows NT 5.2)', 'Windows Vista' => '(Windows NT 6.0)', 'Windows 7' => '(Windows NT 7.0)', 'Windows NT 4.0' => '(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)', 'Windows ME' => 'Windows ME', 'Open BSD' => 'OpenBSD', 'Sun OS' => 'SunOS', 'Linux' => '(Linux)|(X11)', 'Mac OS' => '(Mac_PowerPC)|(Macintosh)', 'QNX' => 'QNX', 'BeOS' => 'BeOS', 'OS/2' => 'OS/2', 'Search Bot'=>'(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves/Teoma)|(ia_archiver)' ); foreach($oslist as $curros=>$Match) { // Find a match if (eregi($Match, $_SERVER['HTTP_USER_AGENT'])) { $os=$curros; break; } }
  12. what's with the $if and $100 you can't begin a variable with a number. I also doubt you want a variable $if100. why don't you tell us what you're actually trying to accomplish. That would help.
  13. You't got double quotes in your double quotes. And you're trying to redirect to an href change this Header("Location: <a class="linkifierplus" href="http://sitename.com">http://sitename.com</a>"); to this Header("Location: http://sitename.com");
  14. This has nothing to do with php. You'll get a better response asking your question in a javascript or even better a jquery forum.
  15. mysql_real_escape_string $note=mysql_real_escape_string("order was updated for $name");
  16. $image="image.png" // this is the image stored in your database $path="/var/www/html/images/"; this is the path to your images folder <img src='<?php echo $path.$image; ?>'>
  17. regist.php?ref=12345 then <input type='text' name='referral' value='<?php echo (isset($_GET['href']) && $_GET['href']!='')?$_GET['ref']:""; ?>'>
  18. you're missing a step $query_relatedItems = "SELECT img01 FROM PortfolioItems WHERE id=103"; $result = mysql_query($query_relatedItems, $dbc) or die(mysql_error()); $relatedItemResults=mysql_fetch_assoc($result); $relatedItemResult=$relatedItemResult[0]; echo $relatedItemResult['img01'];
  19. if $_GET['identity'] could be a string you need single quotes $derived = "select * from derived_values where identity = '".$_GET[identity]."'";
  20. here's a simplified version of the pagination I use. $resultset=1; // set this to the resultset you want $perpage=10; $sql="select count(*) as count from table"; $result=$mdb2->query($sql); while($row=$result->fetchRow(MDB2_FETCHMODE_ASSOC)) { $total=$row['count']; } $total=ceil($total/$perpage) // total number of resultsets if($resultset > $total) { $resultset=$total; } if($resultset< 1) { $resultset=$total; } $resultset=($resultset-1)*$perpage; $sql="select * from table limit $resultset,$perpage"; // get your results here
  21. It's possible there's a typo in your code and you don't have error reporting on. That could be the reason for the white screen. Try putting this ini_set('display_errors',1); error_reporting(E_ALL); at the top of your code. That should tell you if that's the case or not.
  22. can you just remove the spaces? $linea="% 1 $ S"; $linea=str_replace(" ","", $linea);
  23. date_default_timezone_set('America/New_York');
  24. It's possible if they don't have a middle initial or prefix. $users=array("John Smith","Jane Doe","Geoff Johns); foreach($users as $user) { $users_exp=explode(" ", $user); $users[$users_exp[1]]=$user; } $users=sort($users);
  25. Here's one way. put something like this before your while loop $depts=array("PT"=>"IT","FT"=>"Administration"); then <?php while (!$rs->EOF) { ?> <tr> <td><?php echo $rs->Fields['EmployeeName']->Value; ?></td> <td><?php echo $rs->Fields[employmentType]->Value; ?></td> <td><?php echo $depts[$rs->Fields['employementType']->Value]; ?></td> </tr> <?php $rs->MoveNext() ?> <?php } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.