Jump to content

taquitosensei

Members
  • Posts

    676
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by taquitosensei

  1. 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']; }
  2. it should be input type='image' to use an image as a submit button
  3. $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 }
  4. 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";
  5. plus you've got two $i loops so every loop you're overwriting what $i was with the 2nd loop.
  6. 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/ }
  7. 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.
  8. 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.
  9. 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
  10. as long as you keep your eyes shut it tastes good
  11. It depends on how much spare change. You'd be surprised what you can buy for a dollar at McDonalds
  12. create a file called phpinfo.php with this only <?php phpinfo(); ?> upload that then browse to it and tell us what happens
  13. 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
  14. 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
  15. you could post to your 2nd page, perform your 1st page validation there then put those in hidden fields on your 2nd page etc..
  16. 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
  17. 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.
  18. 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.
  19. 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
  20. 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"); } }
  21. or change your encoding in your headers. If it's set to UTF-8 now try iso-8859-1 or vice versa
  22. you need to post the code for the lotto_inf class for anyone to be able to figure out what's wrong
  23. 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
  24. You can't use a period in a variable name. You need to change your variable name
  25. 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++;
×
×
  • 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.