taquitosensei
Members-
Posts
676 -
Joined
-
Last visited
-
Days Won
2
Everything posted by taquitosensei
-
This would make it a bit better $result_contacts = mysql_query("SELECT (SELECT sector,count(*) as Count FROM company group by sector"); if ($row = mysql_fetch_array($result_contacts)) { echo "The number of companies in ".$row['sector']." is: ".$row['Count']; }
-
[SOLVED] Image button submit...tried hidden field...etc.
taquitosensei replied to mo's topic in PHP Coding Help
it should be input type='image' to use an image as a submit button -
[SOLVED] Warning: implode() [function.implode]
taquitosensei replied to jkewlo's topic in PHP Coding Help
$userid is probably not an array. if(is_array($userid)) { $user_string = implode(',', $userid); } else { //do whatever you'd do if $userid isn't an array } -
[SOLVED] Echoing Variables incorrectly due to bad structure
taquitosensei replied to aeafisme23's topic in PHP Coding Help
try this <?php if ($password == "xxx1"){ $name = "Rick Baggot"; $phone = "not available"; } elseif ($password == "xxx2"){ $name = "Richard Burnett"; $phone= "not available"; } echo "Your name is $name and your phone number is: $phone This is all pertinent information for all that correctly logged in, no one else should be able to see it"; -
you could put your sizes in an array and loop through it. $sizes=array( array("width"=200,"height"=200), array("width"=10,"height"=10) ); // etc etc etc foreach($sizes as $size) { //$size['height'] is 200 and width is 200 // do whatever you need to do/ }
-
select friends.friendname,users.image from friends JOIN users where users.friendname=friendname.friendname order by friendname if it's possible that a user won't have an image then instead of JOIN you would use LEFT JOIN would return an empty field for user.
-
session_start has to come before ANY output. Spaces / HTML anything and if you're including a page and you've already started your session you don't have to start it again.
-
Do you have the chinese font installed on your server? Also make sure it's using utf-8 for your database. SET NAMES utf8 after your connection. and then in your header make sure you're using utf-8 Content-Type: text/html;charset=utf-8
-
I am new to PHP, what exactly is it good for?
taquitosensei replied to yakoup46's topic in Miscellaneous
as long as you keep your eyes shut it tastes good -
I am new to PHP, what exactly is it good for?
taquitosensei replied to yakoup46's topic in Miscellaneous
It depends on how much spare change. You'd be surprised what you can buy for a dollar at McDonalds -
create a file called phpinfo.php with this only <?php phpinfo(); ?> upload that then browse to it and tell us what happens
-
I am new to PHP, what exactly is it good for?
taquitosensei replied to yakoup46's topic in Miscellaneous
Here's an example of something dynamic if($a==1) { echo '$a equals 1'; } else { echo '$a doesn\'t equal 1' } At this point I'd suggest reading a book that shows how to develop a website using php -
the code here is not the same code as on the site. On your site I have a feeling instead of <?php and ?>you have and so it's not parsing the php
-
[SOLVED] multi screen form, problem processing second screen
taquitosensei replied to alfa's topic in PHP Coding Help
you could post to your 2nd page, perform your 1st page validation there then put those in hidden fields on your 2nd page etc.. -
Why isn't This Working? (Form Submission)
taquitosensei replied to djcochran's topic in PHP Coding Help
either use echo mysql_error($result); just after the $result line or print_r($result); this gives you almost too much information or echo $sql; then run this in your mysql client phpmyadmin etc just to make sure the sql statement looks right -
[SOLVED] IF statement in function not working help
taquitosensei replied to jamesxg1's topic in PHP Coding Help
you're missing a ; <?php function CheckFolder() { $userid = $_SESSION['userid']; // right here you're missing this ; if(!file_exists(../User_Files/$userid)) die("FileGenPrimary(); FileGenImages(); FileGenVideos(); FileGenDocs();"); } ?> a lot of times the the error is actually before the line number reported. -
[SOLVED] php send email / a few errors
taquitosensei replied to AsiaUnderworld's topic in PHP Coding Help
Really....you don't say. I would try putting what I put for $username in place of $username. And then put print_r($_POST) at the top of your script. -
[SOLVED] php send email / a few errors
taquitosensei replied to AsiaUnderworld's topic in PHP Coding Help
that's because mysql_fetch_assoc, fetches an associative array you would need to use $username['username']; plus $_POST['email'] doesnt' exists. try print_r($_POST); at the top of your page you'll see what I'm talking about -
not sure what you're trying to accomplish here. But if you're trying to checke each value something more like this $myFixedArray[0] = $row_rs_letter['bq1']; $myFixedArray[1] = $row_rs_letter['bq2']; $myFixedArray[2] = $row_rs_letter['bq3']; $myFixedArray[3] = $row_rs_letter['bq4']; $myFixedArray[4] = $row_rs_letter['ny']; $myFixedArray[5] = $row_rs_letter['bq8']; $myFixedArray[6] = $row_rs_letter['bq9']; $myFixedArray[7] = $row_rs_letter['Q3367']; $myFixedArray[8] = $row_rs_letter['Q3363']; $myFixedArray[9] = $row_rs_letter['Q3362']; $whois = $_GET['ID']; foreach($myFixedArray as $key => $value) { if ($value == "") { echo ("N/A"); } }
-
Apostrophes, Speech Marks pulling through strangely
taquitosensei replied to stublackett's topic in PHP Coding Help
or change your encoding in your headers. If it's set to UTF-8 now try iso-8859-1 or vice versa -
you need to post the code for the lotto_inf class for anyone to be able to figure out what's wrong
-
you're still using a period in your variable name. If you had error reporting on you'd be getting this PHP Parse error: syntax error, unexpected '=' you need to change $d_co.uk to $d_couk or $d_co_uk anything other than $d_co.uk
-
You can't use a period in a variable name. You need to change your variable name
-
I think you forgot brackets here if($count == 0 || $currentID != $previousID) $CallNumber = 1; else $CallNumber++; should be if($count == 0 || $currentID != $previousID) { $CallNumber = 1; } else { } plus you can change error reporting by adding this ini_set("display_errors","1"); ERROR_REPORTING(E_ALL); to the top of your page $CallNumber++;