-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
[SOLVED] How do I get the GIF image out of this PHP script?
MadTechie replied to Jezorama's topic in PHP Coding Help
add this to the start of the script header("Content-Type: image/gif"); header('Content-Disposition: attachment; filename="test.gif"'); -
[SOLVED] script dont work on godaddy....again...
MadTechie replied to alexander007's topic in PHP Coding Help
about ? as i said the that error isn't from that script.. -
A Couple Questions .. One On Require.. One On Sessions
MadTechie replied to spdwrench's topic in PHP Coding Help
well you could use sessions but your be better of creating classes and use OOP -
A Couple Questions .. One On Require.. One On Sessions
MadTechie replied to spdwrench's topic in PHP Coding Help
$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";} -
[SOLVED] assign variable to mysql row (id = value)
MadTechie replied to ahs10's topic in PHP Coding Help
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!, -
i assume you mean a subject!
-
if ( !isset($Ord) || empty($Ord) ) { $Ord = 'ID'; }else{ $Ord = $_GET['Ord']; } $sql = "SELECT * FROM store ORDER BY `$Ord`";
-
[SOLVED] assign variable to mysql row (id = value)
MadTechie replied to ahs10's topic in PHP Coding Help
OK Thorpe is cleaner but we're on the same page and neither know why you would want this! -
[SOLVED] script dont work on godaddy....again...
MadTechie replied to alexander007's topic in PHP Coding Help
ok how is that not a standard (excluding the server not being localhost)? alexander007 @ you will not recieve the error from thats script -
@header("Content-type: text/plain"); //only 1 header please! @ omits the error
-
[SOLVED] assign variable to mysql row (id = value)
MadTechie replied to ahs10's topic in PHP Coding Help
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 ? -
[SOLVED] script dont work on godaddy....again...
MadTechie replied to alexander007's topic in PHP Coding Help
your not setting comentario ie &comentario=blar -
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)
-
[SOLVED] assign variable to mysql row (id = value)
MadTechie replied to ahs10's topic in PHP Coding Help
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 "); -
[SOLVED] script dont work on godaddy....again...
MadTechie replied to alexander007's topic in PHP Coding Help
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"; } ?> -
A Couple Questions .. One On Require.. One On Sessions
MadTechie replied to spdwrench's topic in PHP Coding Help
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) -
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
-
A Couple Questions .. One On Require.. One On Sessions
MadTechie replied to spdwrench's topic in PHP Coding Help
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]' -
[SOLVED] script dont work on godaddy....again...
MadTechie replied to alexander007's topic in PHP Coding Help
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"; } ?> -
A Couple Questions .. One On Require.. One On Sessions
MadTechie replied to spdwrench's topic in PHP Coding Help
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 -
[SOLVED] HELP!Cant convert to integer from string format!!!
MadTechie replied to jigen7's topic in PHP Coding Help
HeeHee, i'll admit i had me for a second.. but string cause that problem and after viewing source... it became clear -
[SOLVED] script dont work on godaddy....again...
MadTechie replied to alexander007's topic in PHP Coding Help
what are you typing in the URL (address bar) (don't worry about the full url just the script name + params -
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
-
[SOLVED] script dont work on godaddy....again...
MadTechie replied to alexander007's topic in PHP Coding Help
open the script via the URL like so script.php?tbl_name=table&comentario=comentario&id=1 change the blue parts to suite -
OK 1. does PMA (phpMyAdmin (http://localhost/phpmyadmin/index.php) ) work 2. if not what is MySQL running, 3. any firewalls running