Jump to content

taith

Members
  • Posts

    1,514
  • Joined

  • Last visited

Everything posted by taith

  1. nope! as long as your url has "?page=about.txt" on it... it should work...
  2. case "index2.php?page=services.txt": case "services.txt":
  3. switch($_GET ){ case "about.txt": echo '<img src="images/topleftbartest.jpg" width="800" height="141"/>'; break; case "": echo '<img src="images/topleftbartest2.jpg" width="800" height="141"/>'; break; default: echo '<img src="images/topleftbartest2.jpg" width="800" height="141"/>'; break; }
  4. oops <? $result = mysql_query("SELECT * FROM userfield"); while ($row=mysql_fetch_assoc($result)) { echo "-- TEST --<br>"; if(!empty($row[field5])) echo "$row[field5] $row[field6]<br>"; if(!empty($row[field7])) echo "$row[field7] $row[field8]<br>"; if(!empty($row[field9])) echo "$row[field9]<br>"; if(!empty($row[field10])) echo "$row[field10]<br>"; if(!empty($row[field11])) echo "$row[field11]<br>"; if(!empty($row[field12])) echo "$row[field12]<br>"; if(!empty($row[field13])) echo "$row[field13]<br>"; echo "-- TESTEND --<br>"; echo "<br>"; } mysql_close($conn); ?>
  5. <? $result = mysql_query("SELECT * FROM userfield"); while ($row=mysql_fetch_assoc($result)) { echo "-- TEST --<br>"; if(!empty($firstnames)) echo "$row[field5] $row[field6]<br>"; if(!empty($addressline1)) echo "$row[field7] $row[field8]<br>"; if(!empty($addressline2)) echo "$row[field9]<br>"; if(!empty($addressline3)) echo "$row[field10]<br>"; if(!empty($citycountry)) echo "$row[field11]<br>"; if(!empty($postcode)) echo "$row[field12]<br>"; if(!empty($country)) echo "$row[field13]<br>"; echo "-- TESTEND --<br>"; echo "<br>"; } mysql_close($conn); ?>
  6. ohok... from the code you provided ontop, its tellling us that anybody could just type over that url, and get another page... not withstanding if its there or not.
  7. i've ran php 4.x, 5, 5.2, and have yet to find one where <?=$var?> doesnt work... besides... most of other php upgrades have been backwards compatable... i dont see why they'd cut this... maybe its not cool enough... lol
  8. <?=$var?> is just a shortform for <?php echo $var?>
  9. honestly... its really down to personal preference... personally... i template everything... so all my stuff is stored in strings, untill it hits the template.php in which is 99% html code... where i <?=$var?>
  10. ya they can :-) just ?><meta><? or echo it... :-) php only alters, manipulates and creates strings(arrays and integers)... basically with .html files... what you put in, is a static string... sent to the browser the same every time... with .php files... it builds that string, then sends it to the browser... so any/all html(even js) will work within a php string...
  11. since headers are sent from the browser, and headers are what hold that information... instead of using header(Location: ); you'd need to either use a javascript redirect, or a meta redirect, which then resends the header, setting the buffer page, to the referrer
  12. personally... with my programming style... i put all my similar tasks into the same page... thats just me tho... it fits my programs nicely... lets me coordinate all my tasks so it runs faster... although... i do keep my personalized functions seperated in seperate folder, with an index that require_once()s them automatically... speeds up debuging ALOT!
  13. YAY! I WIN! *pats himself on the head* what do i win?
  14. only 1 of loading pages, without changing pages... ajax... p.s. thats a VERY unsecure way of doing it
  15. $sql = mysql_query("SELECT * FROM dispo_money LIMIT $from, $max_results"); if(mysql_num_rows($sql)==0){ echo 'empty!'; }else{ while($row = mysql_fetch_array($sql)) { } }
  16. ^[A-Z][a-z][0-9][\_]$ ^ <-- start of string $ <-- end of string [] <-- conditionals
  17. that would be a javascript issue... not php... try posting on the javascript forum...
  18. what is select supposed to have? print_r($_POST); what does it have?
  19. ya... the only way to store stuff onto the server, is to connect, to the server...
  20. that exact error... probably the host is wrong... still your webhost would be the ones to fix it...
  21. change the password to your ftp/filemanager... make longer/harder...
  22. that means your mysql username/pass/host are wrong... contact your webhost, make sure their right
  23. in most cases... yes... break; should be used for switch()es... as this is only doing one specific task, they arnt necessary, if you exit; ...but it is good coding practice...
  24. you need to be careful with headers, you want to "exit;" right after any/all of them...
×
×
  • 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.