-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
Script ignoring isset and runing query regardless
MadTechie replied to genista's topic in PHP Coding Help
change <?php if(isset($_POST['submit'])) { $_POST['username'] = $row ["username"]; $_POST['supplierid'] = $id; ?> to <?php if( isset($_POST['username']) && isset($_POST['supplierid']) ) { $_POST['username'] = $row ["username"]; $_POST['supplierid'] = $id; ?> -
PHP confusion with documentation and versions
MadTechie replied to ismfw068's topic in PHP Coding Help
your need an active mail server for the mail to be sent from, it doesn't need to be on the same machine as the php/webserver server note: hotmail doesn't work but others do (i'm not sure which ones have been tested) -
[SOLVED] $_GET variable MySQL SELECT problem
MadTechie replied to RedBoffin's topic in PHP Coding Help
can you post the function $this->databaseConnector->selectQuery -
try <?php $hostname="localhost"; $dbuser="user"; $dbpass="password"; $link = mysql_pconnect($hostname, $dbuser, $dbpass) or die("could'nt connect to my sql database ".mysql_error()); $select_database = mysql_select_db("develub_amigos", $link) or die("could'nt select sql database ".mysql_error()); $sql="select * from video_members where featured = '1' order by id desc limit 0,3"; $result = @mysql_query($sql, $link) or die("could'nt query '$sql' ".mysql_error()); ?> this is why i think its a file not being included. only real way is to check
-
Script ignoring isset and runing query regardless
MadTechie replied to genista's topic in PHP Coding Help
So submit is being set! -
so i guess something like <?php $subject = "METAR = EGSC 230850Z 22008KT 150V260 8000 NSC 13/10 Q1019"; if (preg_match('/NSC (\\w+)\/.*Q(\\w+)/', $subject, $regs)) { $temp = preg_replace("/[Mm]/","-",$regs[1]."C"); $display = "avg. temperature $temp<br />pressure {$regs[2]} millibars"; } else { $display = "nothing found"; } echo $display; ?> results avg. temperature 13C pressure 1019 millibars or for METAR = EGSC 230850Z 22008KT 150V260 8000 NSC M13/10 Q1019 avg. temperature -13C pressure 1019 millibars
-
OK, do you have phpMyAdmin Installed ? if so can you test the SQL statement to check its valid ? or even <?php $hostname="localhost"; $dbuser="user"; $dbpass="password"; $link = mysql_pconnect($hostname, $dbuser, $dbpass) or die("could'nt connect to my sql database ".mysql_error()); $select_database = mysql_select_db("develub_amigos", $link) or die("could'nt select sql database ".mysql_error()); or Die("could'nt select database"); $sql="select * from video_members where featured = '1' order by id desc limit 0,3"; $result = @mysql_query($sql, $link) or die("could'nt query '$sql' ".mysql_error()); ?> this should help find the error
-
change <?php } } function redirect($filename) { $redirecturl = "http://www.argendeli.net/$filename"; echo "<script type='text/javascript'>"; echo "<!--"; echo "window.location = $redirecturl"; echo "//-->"; echo "</script>"; } } ?> to <?php } } } function redirect($filename) { $redirecturl = "http://www.argendeli.net/$filename"; echo "<script type='text/javascript'>"; echo "<!--"; echo "window.location = $redirecturl"; echo "//-->"; echo "</script>"; } ?>
-
please post your code (in the code tags) please
-
when the page gets stuck.. what the url is stuck on ? ie confirmation.htm does that page exists etc?
-
Script ignoring isset and runing query regardless
MadTechie replied to genista's topic in PHP Coding Help
is that all the code ? assume your aware your missing <?php at the start and ?> before the <html> also i am pretty sure the error isn't in the code to supplied but in a few lines before it -
if your re-building the community_connect.php from parts of the config.php then your need the part mysql_connect or mysql_pconnect
-
<?php function redirect($filename) { $redirecturl = "http://www.argendeli.net/$filename"; echo "<script type='text/javascript'>"; echo "<!--"; echo "window.location = $redirecturl"; echo "//-->"; echo "</script>"; } ?>
-
my bad i re-read the error include("community_connect.php"); is fine its used on line 3 of includes/config.php.
-
in your code do a find for header("Location: for ever line you find add ob_end_clean(); above it ie header("Location: ".$thanks_page[$config]); change to ob_end_clean(); header("Location: ".$thanks_page[$config]);
-
Make sure you update include("community_connect.php"); to the correct path means it can't find the file used on that line
-
its an example, just update your SQL statement, or post your SQL statement
-
OK the error line is header("Location: ".$thanks_page[$config]); there is a post pinned about this subject headers basically nothing must be printed to the screen, now if this script is being called from another file then that file must also not print to the screen, if this script is being called alone then as you have used ob_start(); at the top you could try <?php ob_end_clean(); header("Location: ".$thanks_page[$config]); ?> PS No worries about last post, it was just very long and i started to worm my way though it and the italics made it very hard
-
OK first off, the "Button" the "Programmer" creates, this then executes a command to which tells the server to sort the records the command is "SELECT * FROM table1 ORDER BY field1, field2" (with options filled in). this is MySQL not FileMaker
-
[SOLVED] Uploading files from multipart forms problem
MadTechie replied to flaab's topic in PHP Coding Help
place to chage is the php.ini (isn't it?) -
theirs a few ways, ie Headers <?php header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past ?> or link to the php file withsomething random on the URI ie "image.php?rnd=11:34.22"
-
ok i assume you didn't write the script.. add <?php $page = 2; ?> at the top, 2 can be anynumber except 0, 1 will display all records without a prev & next Note: I would find another paging system
-
What! each time you pull a record you can print the fields to the screen in any order you wish! i think your need to provide some code as what your saying sounds a little weird maybe SELECT name, infomation, color, etc FROM tabel1 will work!!
-
<?php if(empty($page)){ $page = 1; } ?> your not setting $page
-
and whats wrong with the way your doing it ?