Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. add this to the start of the script header("Content-Type: image/gif"); header('Content-Disposition: attachment; filename="test.gif"');
  2. about ? as i said the that error isn't from that script..
  3. well you could use sessions but your be better of creating classes and use OOP
  4. $confload should only become 1 after if config.php is loaded you could try this in config.php define("confload","Loaded"); if (isset(confload)){require "config.php";}
  5. it just seams strange, as their alway the same i assume you have a fixed number of records.. which makes me wonder why you don't have these as fields instead!,
  6. i assume you mean a subject!
  7. if ( !isset($Ord) || empty($Ord) ) { $Ord = 'ID'; }else{ $Ord = $_GET['Ord']; } $sql = "SELECT * FROM store ORDER BY `$Ord`";
  8. OK Thorpe is cleaner but we're on the same page and neither know why you would want this!
  9. ok how is that not a standard (excluding the server not being localhost)? alexander007 @ you will not recieve the error from thats script
  10. @header("Content-type: text/plain"); //only 1 header please! @ omits the error
  11. OK you could do this $id =$row['id']; $$id = $row['value']; BUT i assume that id is a number and a variable can NOT start with a number and even then you will probably end up in a mess with this.. may i ask why you wish to do this ?
  12. your not setting comentario ie &comentario=blar
  13. try this <?php header("Content-type: text/plain"); //only 1 header please! $email = array(); for ($n=0;$n<90;$n++) { $seed = "http://www.site.com/page.php?p=$n"; $data = file_get_contents($seed); if (preg_match_all("/\http:[^\"\s']+/", $data, $links)) { for ($i=0;$i<count($links[0]);$i++) { $email[] = $links[0][$i]; } }else{ echo "Skipped: $n<br>"; } } $newemail = array_unique($email); echo "<pre>"; print_r($newemail); ?> untested (written on the fly)
  14. am i correct in saying you wish to "update" the values ? if so.. your need to look into MySQL a little more for example $result = mysql_query("UPDATE reporting SET `Value`='NewValue' WHERE ID=2 ");
  15. that won't work! try this is you must keep the params <?php include"config.php"; $tbl_name = $_GET['tbl_name']; $id = (int)$_GET['id']; $comentario = $_GET['comentario']; $sql="UPDATE $tbl_name SET comentario='$comentario' WHERE id='$id'"; $result=mysql_query($sql)or die(mysql_error()); if($result){ echo "<center>Cambio se realizo satifactoriamente.</center>"; echo "<BR>"; echo "<center><a href='viewvisitante.php'>Volver Atras</a><center>"; } else { echo "ERROR"; } ?>
  16. i kinda made sense of it, i can't see anything that would cause the problem.. maybe a loop (but would be easier, if we could create the problem)
  17. Only way is to send the before you encode it.. so when they register you can sent it then or on login (kinda weird to do that) if you want a "forgot password" option then you could create a random password and change their password to that and email them the new password
  18. Erm.. whats the fucntion f and function q ie $user_info = f(q($query)); also $fMember[id] should be $fMember['id'] $f_profile[member_id] should be $f_profile['member_id'] etc etc etc if id is an int it shoud not be quoted WHERE id='$f_profile[member_id]'
  19. ok try this editvisitantes.php?id=1 with this update <? session_start(); if(!session_is_registered(username)){ header("location:/travel/admin"); } ?> <?php include"config.php"; $comentario = 'test'; $tbl_name = 'visitantes'; $id = (int)$_GET['id']; $sql="UPDATE $tbl_name SET comentario='$comentario' WHERE id='$id'"; $result=mysql_query($sql); if($result){ echo "<center>Cambio se realizo satifactoriamente.</center>"; echo "<BR>"; echo "<center><a href='viewvisitante.php'>Volver Atras</a><center>"; } else { echo "ERROR"; } ?>
  20. if ($loaded!=1){require "loadconfiguration.php"}; will work better that require_once (as require_once will back track to see if it has loaded, which is slower) as for the problem with the email, can they choose the email option from many different places, if so try to find the place it cause the problem, you really need to be able to recreate the problem over and over to find the solution either that or blind shooting.. try looking at the forms and JS as most of the problems with IE vs FF are in those areas
  21. HeeHee, i'll admit i had me for a second.. but string cause that problem and after viewing source... it became clear
  22. what are you typing in the URL (address bar) (don't worry about the full url just the script name + params
  23. most people store the database host/username/password in a config.php file ie <?php $DB_HOST="localhost"; $DB_USER="root"; $DB_PASS="password"; ?> then include that file whenever they use the database and instead of retyping the password they use $DB_PASS, now as the config.php is a php file its parse by the server so the end user can not see that password as for storing members password IN a database, well personally i use MD5+SALT.. more detail if you need it
  24. open the script via the URL like so script.php?tbl_name=table&comentario=comentario&id=1 change the blue parts to suite
  25. OK 1. does PMA (phpMyAdmin (http://localhost/phpmyadmin/index.php) ) work 2. if not what is MySQL running, 3. any firewalls running
×
×
  • 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.