-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
I'll mark this as solved, you could (un)solved it by clicking "topic solved" bottom left
-
stripos is for PHP5+, why are you on PHP 4 ? PHP 6 is out soon! as for https pages whats the exact problem? maybe a cURL or socket connection would be better!
-
Why are to trying to do this via the command line ? instead of via the gui ? "Old" Mac mind you. OS X is Unix based. True, but Mac OS X can use either forward slash (POSIX paths) or colon ('Mac' paths) > ver Sinclair ZX81 time for an upgrade!
-
No.. folders are separated depending on the OS DOS & Windows uses \ Unix uses / Mac uses :: and in apache & php you can use / as well as \ ie DocumentRoot "C:/public_html" <Directory "C:/public_html">
-
:'( DROP parent Congratulations premiso, They are a handful.. but Make the most of ever day..Mines almost 3.. (dame I have no idea where the time went),
-
The error doesn't seam to match your code, can you post the full functions.php and index.php also in your login_user function shouldn't email = '$email' be email = '$username' in the following $username = secure_var($email); $password = md5($password); if ($username != NULL and $password != NULL){ $login_query = mysql_query("SELECT * FROM user_info WHERE email = '$email' AND password = '$password'");
-
$places would be an array, your need to use a loop, ie foreach($places AS $p){ if (!in_array ($places , $wgt_places)) { echo 'ERROR'; exit; } }
-
Nope, anything before the <?php can be considered output, inside the php tags is safe ie this would be fine <?php header("Location: http://www.google.com"); ?>
-
correct, at the top should be <?php session_start(); if (!isset($_SESSION['uid'])){ header("Location:index.php"); exit(); } ?> and <?php if (isset($_SESSION['uid'])){ echo "<b>welcome</b>"; }else{ header("Location:index.php");} should be <b>welcome</b>
-
Your need to pass the parameter via a POST or a GET for example (GET), delete.php?delete_path=123 the PHP would look like this <?php $delete_path = $_GET['delete_path']; //do something with $delete_path for example (POST), the PHP would look like this <?php $delete_path = $_POST['delete_path']; //do something with $delete_path Now my flash skills are.. well not that great! but this should work or at least give you a direction your button would call an AS that would look like this GET var delete_path:string = "123"; getURL("delete.php?delete_path="+delete_path); POST your use LoadVars.send or LoadVars.sendAndLoad LoadVars.send does a POST (or GET) without opening a browser windows or displaying anything to the user. LoadVars.sendAndLoad does the same thing while getting a return value from the target script. userData = new LoadVars(); userData.delete_path = "123"; userData.send("delete.php", 0, "POST"); Hope that helps
-
PREVENTING Piracy of web based applications
MadTechie replied to canadabeeau's topic in Miscellaneous
It really depends on what the application does! -
PREVENTING Piracy of web based applications
MadTechie replied to canadabeeau's topic in Miscellaneous
If the code in on their server you need to look at securing it until you release a new version, as all protections are crackable read up on ionCube PHP Encoder sourceguardian EDIT: no Zend Guard works on all PHP but requires Zend Optimizer on the server (which is pretty common) -
Pagination doesn't display the results - Huge problem..
MadTechie replied to Irresistable's topic in PHP Coding Help
You know I skip many posts, this is a FREE service after all, My post was an intended to help you get help from myself or someone else, the fact I even took the time to tell you why I skipped it should give you some insight why your not getting help, because believe it or not many people skip posts, You know I could of saved myself a lot of trouble and just no replied as I did on the first visit! Look at the topic (Read 67 times at the time of this post!) I have replied 2 twice, that's 65 visitors who skipped this post! if it came a cross in a negative way then, I'm sorry but I was only trying to help.. as many people get frustrated when they get no replies and start bumping.. everyone who posts in the 'PHP Coding Help' section wants help but they don't all bump! Now.. in an attempt to continue with the problem! the code you have posted doesn't work, So could you post a var_dump() of $row, $row1 and $row2 and also posting some code that works with the array would probably help example for var_dump while($row = $pagedResults->fetchPagedRow() && $row1 = $pagedResults1->fetchPagedRow() && $row2 = $pagedResults2->fetchPagedRow()) { //when $row is false loop terminates var_dump($row); //ADD var_dump($row1); //ADD var_dump($row2); //ADD die(); //ADD echo '<tr><td>'.$row.'</td><td>'.$row1.'</td><td>'.$row2.'</td></tr>'; } -
Whats not working exactly ? one thing i can see thing that just don't make logical sense is $data = get_url($url,$cuvant,$start); Yet function get_url($url,$h=false) { also echo $r['url']."\n"; can't be right i'm sure it should be loop thought the $rezultate[2] as $r and then use $r as the URL
-
like this <?php $html = file_get_contents("http://xkcd.com/663/"); $find = "<h1>Sagan-Man</h1><br/>"; if(stripos($html,$find) !== false){ echo "found"; }
-
ok i need to join all this pages to make 1 neat code
MadTechie replied to the-botman's topic in PHP Coding Help
-
something along these lines <?php $page =(empty($_GET['page']))1:$_GET['page']; //get page $page = $page * 10; // $lines = file('thefile.txt'); for($n=($page-10)$n<$page;$n++){ echo lines[$n]."<br />\n"; } echo "<a href=\"page=".$page-1."\">previous</a> | <a href=\"page=".$page+1."\">next</a>"; untested but you should get the idea
-
lard, can you please click "topic solved" to close this thread
-
Add to SQL ORDER BY RAND() LIMIT 9
-
ok i need to join all this pages to make 1 neat code
MadTechie replied to the-botman's topic in PHP Coding Help
What problems did you encounter ? try creating a new file and adding each page to it, and explain the problems -
@chauffeur, just because they have the same name doesn't make them DOS files!! they are the same for reverse compatibility, of course using the Windows Virtual DOS Machine (NTVDM) subsystem looks like DOS that won't allow all DOS interrupts to function (ie INT 13) And while its true that XP contains a copy of the core from MS-DOS 8 files, it is ONLY accessible by formatting a floppy as an "MS-DOS startup disk". These core files are a stripped down bootstrap only, and once booted your in a 16bit boot System. The true 32-bit versions of Windows, from Windows NT, are not based on DOS but provide a command-line interface similar to MS-DOS's character-mode interface known as the console. This is provided by a native executable, cmd.exe. Many Windows console applications are incorrectly referred to as DOS applications. However, in reality they are Windows applications, using Windows system calls, using the text console for input and output rather than a graphical interface. By the way "wrong DOS" doesn't mean what you think it means.. technically all Windows/Unix/Mac's run on a Disk Operating System, but that's. doesn't mean the OS is called DOS! "Even NT comes from its humble beginnings in DOS." No NT removed DOS hence NT (New Technology)
-
2 options, <?php $IN = "1/2"; eval("\$Out = $IN;"); //people don't like eval for security reasons so list($a,$b) = explode("/",$IN); $Out = $a/$b; echo $Out;
-
The trick behind this is to create a table in the database that had the technician # emails, ie ID, Name, email 1, technician 1, tech1@email.com 2, technician 2, tech2@email.com 3, technician 3, tech3@email.com then in the form loop thought the list and create select option for each technician in the form, ie <SELECT name="tech"> <OPTION VALUE="0">All</OPTION> <?php $result = mysql_query("SELECT * FROM table"); while($row = mysql_fetch_assoc($result)){ ?> <OPTION VALUE="<?php echo $row['ID']; ?>"><?php echo $row['Name']; ?></OPTION> <?php } ?> </SELECT> then in the email script have $tech = (int)$_POST['tech']; //get requested email id if($tech > 0){ $result = mysql_query("SELECT * FROM table WHERE ID=$tech"); }else{ $result = mysql_query("SELECT * FROM table"); } $emails = array(); while($row = mysql_fetch_assoc($result)){ $emails[] = $row['Email']; //build email list } $emails = implode(",",$emails); //put emails into a comma delimited string echo "email to ".$emails; please note all code was written direct so theirs probably typos/syntax errors, but it should give you the idea
-
Please click topic solved (button at the bottom left)
-
A VERY basic idea would be to use ob_gzhandler like this, <?php ob_start("ob_gzhandler"); ?> <html> <body> <p>This should be a compressed page.</p> </html> <body> however now all browsers will accept (unzip it), so adding a check maybe an idea <?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>