taquitosensei
Members-
Posts
676 -
Joined
-
Last visited
-
Days Won
2
Everything posted by taquitosensei
-
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 }
-
you've got extra spaces after the single quotes. (postcode LIKE ' m13%' OR town LIKE ' m13%') vs (postcode LIKE 'm13%' OR town LIKE 'm13%')
-
PHP redirect after ajax form validation
taquitosensei replied to doforumda's topic in Javascript Help
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 -
Limiting an echo function to specified results
taquitosensei replied to ryanwood4's topic in PHP Coding Help
if(($photoID+1) < mysql_num_rows($result)) { // echo your next code here } -
how to call js function from server-side php
taquitosensei replied to dsdsdsdsd's topic in PHP Coding Help
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. -
$count=0; foreach($list as $array) { $count=($array['amount'] > 0)?$count++:$count; }
-
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.
-
how about if ($r['Something'] == "somethingindb") { echo "blah"; }
-
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
-
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.
-
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; } }
-
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.
-
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");
-
jquery is not working after the ajax call
taquitosensei replied to piyush23424's topic in PHP Coding Help
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. -
mysql_real_escape_string $note=mysql_real_escape_string("order was updated for $name");
-
$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; ?>'>
-
Get URL to automatically paste username into referral box?
taquitosensei replied to Bfghost's topic in PHP Coding Help
regist.php?ref=12345 then <input type='text' name='referral' value='<?php echo (isset($_GET['href']) && $_GET['href']!='')?$_GET['ref']:""; ?>'> -
Could somebody please help me with mysql request
taquitosensei replied to spenceddd's topic in PHP Coding Help
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']; -
if $_GET['identity'] could be a string you need single quotes $derived = "select * from derived_values where identity = '".$_GET[identity]."'";
-
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
-
passing variables thru to SQL Server using an array
taquitosensei replied to cerebrus189's topic in PHP Coding Help
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. -
Replace a string, the code does not go well written but
taquitosensei replied to pibebueno's topic in PHP Coding Help
can you just remove the spaces? $linea="% 1 $ S"; $linea=str_replace(" ","", $linea); -
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 } ?>