-
Posts
1,141 -
Joined
-
Last visited
Posts posted by dropfaith
-
-
Uh video doesn't have to be 'DVD quality' to burn it to a DVD. But yeah, Netflix videos are definitely not typical DVD quality. Also, I'm sure it majorly breaches Netflix's ToS to burn DVDs. Then again, that's never stopped me before ;p.
i understand that but im saying to my knowledge the watch instantly thing is streaming how can i save that in order to burn them??
as it is now i just burn the ones netflix mails me i want the instant ones too
-
this code below gets everything and displays it properly how i want it im new at javascript so im wondering how i can make a slideshow using the data coming out of my database..
ive seen some slideshow codes from google but none of them cover a php and mysql playlist of sorts
<h2>Portfolio</h2> <? // includes include("template/conf.php"); // open database connection $connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!"); // select database mysql_select_db($db) or die ("Unable to select database!"); // generate and execute query $query = "SELECT * FROM gallery WHERE Spotlight = 'Yes'"; $result = mysql_query($query) or die ("Error in query: $query. " . mysql_error()); if (mysql_num_rows($result) > 0) { // iterate through resultset // print article titles while($row = mysql_fetch_object($result)) { ?> <img class="spotlight" src="portfolio/<? echo $row->Image; ?>" alt="<? echo $row->Title; ?>" title="<? echo $row->Title; ?>" /> <p><? echo $row->About; ?></p> <h2><a href="<? echo $row->Website; ?>">Click Here For Website</a></h2> <? } } // if no records present // display message else { ?> <? } // close database connection mysql_close($connection); ?>
-
make a column in your user table that is called logged in and when the user logs make it update that field to true
and display all users from usertable where logged in = true
-
such a hard thing to walk thru in a forum thread
link contains pretty sweet tutorial easy to follow and implement doesnt have a captcha but the log in system is the harder part to implement anyways..
also it requires activation and spammers wont activate accounts so i just set up to remove all unactivated accounts after a certain timeframe
-
netflix isnt that bad but downloading to burn a copy or just watching netflix streams movies but to my knowledge i cantr get dvd quality downloaded so i can burn a copy..
unless im missing something
-
I found this great implementation to remove blank (empty lines) from a string at PHP web site.
function removeEmptyLines($string) { return preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $string); }
-
oh yeah legit i missed that i was like damn thats an easy answer adding legit makes this alot harder
-
-
Do not forget to use mysql_real_escape_string to avoid SQL Injections.
yeah i know i just tagged the code up to demonstrate what i was attemptin g to do better explaining was too hard
thatnks tho
-
im sure i cant be too far off but this doesnt work properly i submits to the database no matter what
<input type="hidden" name="referral" value="ImagesByTroy" />would submit the form to the database
but
<input type="hidden" name="referral" value="" />Would not
referral is a hidden form field that uses get from the previous page to populate
<?php if(!is_array($_GET['referral'])) { include("../client/header.php"); // set up error list array $errorList = array(); $count = 0; // validate text input fields $ip = $_POST['ip']; $httpref = $_POST['httpref']; $httpagent = $_POST['httpagent']; $Earned = $_REQUEST['Earned'] ; $Billed = $_POST['Billed']; $Name = $_REQUEST['name']; $Referral = $_REQUEST['referral']; $Email = $_POST['email']; // check for errors // if none found... // generate and execute query $query = "INSERT INTO referrals (Referral, Name, Billed, Earned, Email) VALUES('$Referral','$Name','0','0','$Email')"; $result = mysql_query($query) or die ("Error in query: $query. " . mysql_error()); echo "<p>Update successful.<a href=index.php>Go Home</a>.<br /></p>"; // close database connection mysql_close($connection); } else { //special circumstance } // includes ?>
-
-
FF has a known feature (bug in my book) where it requests a page twice when it applies the character encoding that the user has set. I'm going to guess if you try IE that it will work as expected. You need to detect and prevent duplicate submissions in your code on the server so that your code is browser and browser setting independent.
You also need an exit; statement after your header() redirect.
damn it is a firefox issue
any quick fix to this ive never had this issue before and have always used only firefox how strange
-
<?php session_start( ); //bored of this function yet? if(!isset($_SESSION["username"])) { header('Location: index.php'); } else // Report all PHP errors error_reporting(E_ALL); { include("header.php"); // validate text input fields $Client = mysql_escape_string(trim(htmlentities($_GET['Client']))); $Date = mysql_real_escape_string(trim(stripslashes($_POST['Date']))); $Website = mysql_real_escape_string(trim(stripslashes($_POST['Website']))); $Testimonial = mysql_real_escape_string(trim(stripslashes($_POST['Testimonial']))); $loginid = mysql_real_escape_string(trim(stripslashes($_POST['loginid']))); // generate and execute query //$query = "UPDATE testimonial SET Website = 'http://www.imagesbytroy.com', Date = 'January 24, 2009', Testimonial = 'test' WHERE Client = 'imagesbytroy'"; $query = "UPDATE testimonial SET Website = '$Website', Date = '$Date', Testimonial = '$Testimonial' WHERE Client = '$Client'"; $result = mysql_query($query) or die ("Error in query: $query. " . mysql_error()); } ?>
i cant see it being any of those errors becuase the currently commented out update works fine but the one with varibiables fails
-
Your browser is requesting your page twice, the first time with the from's post data, the second time without the post data (only the URL that has the Client= parameter), so the data is first updated with the actual data, then it is updated again with empty data.
The reason it is being submitted twice is either due to your browser (which browser are you using and have you tried a different one), some javascript in your form submitting it along with the browser submitting it (what is the code for stripHTML()), or some mod_rewrite that is causing the browser to request the page twice (are you doing any url rewriting and if so what.)
Two ways to fix - 1) you should be validating all data being put into the query and if it does not contain expected values, output a meaningful user message and don't execute the query, or 2) set a session variable after you have executed the query once on the page and check if that session variable is already set before you execute the query to prevent duplicate (less the data) submissions.
firefox 3.05 i think is the version im on currently
javascript has actually been removed and theres no effect on this script at all still does the same thing
no url rewriting at all
-
damn, I guess I meant to say $_REQUEST...not $_GET
Array ( [Client] => imagesbytroy [loginid] => 122 [Website] => http://www.imagesbytroy.com [Date] => January 24, 2009 [Testimonial] => kj [submit] => Add [__utma] => 209552327.3031029602016247300.1232256851.1232256851.1232256851.1 [__utmz] => 209552327.1232256851.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none) [phpSESSID] => b1e08b68ddc0e378c6ec21e79d441b62 ) 1
-
so you're telling me that the variables are going into the query fine, but still continue to erase things when updating.....odd
just for gits and shiggles....
run
echo "<pre>" . print_r($_GET) . </pre>"
Array ( [Client] => imagesbytroy )
1
UPDATE testimonial SET Website = 'http://www.imagesbytroy.com', Date = 'January 24, 2009', Testimonial = 'test' WHERE Client = 'imagesbytroy'
in phpmyadmin works fine
-
hrmm think it could be the comma in the date field?? throwing this all off?
-
hrmm odd but no thats actually not needed now that i look into my code a bit more i have the whole connection in header.php just never removed it i guess
-
using the exact query you used worked fine but making it with varibles from a form still fails for the same reason above no errors just erases all data im trying to update
i dont understand why its getting the data just fine
UPDATE testimonial SET `Website` = 'http://www.imagesbytroy.com', `Date` = 'January 24, 2009', `Testimonial` = 'nestttt' WHERE `Client` = 'imagesbytroy'
just clearing out the database values instead of updating
form code ust in case
<form onSubmit="stripHTML(this.Name, this.Testimonial, this.Website)" action="edittestimonialscript.php?Client=<?php $Client = mysql_escape_string(trim(htmlentities($_GET['Client']))); echo $Client; ?>" method="POST"> <?php include("header.php"); $u = $_SESSION['username']; $uid = $_SESSION['loginid']; $query = "SELECT * FROM testimonial WHERE loginid = '$uid'"; $result = mysql_query($query) or die ("Error in query: $query. " . mysql_error()); // if records present if (mysql_num_rows($result) > 0) { // iterate through resultset // print article titles while($row = mysql_fetch_object($result)) { ?> <p> <input type="hidden" name="Client" value="<? echo $row->Client; ?>"> <input type="hidden" name="loginid" value="<? echo $row->loginid; ?>"> </p> <p> <label>Website</label> <input type="text" name="Website" size="28" value="<? echo $row->Website; ?>"> </p> <p> <label>Date</label> <input type="text" name="Date" size="28" value="<?php $today = date("F j, Y"); PRINT "$today";?>"> </p> <p> <label>Testimonial</label> <textarea name="Testimonial" cols="72" rows="20"><? echo $row->Testimonial; ?></textarea> </p> <? } } // if no records present // display message else { ?> <? } // close database connection mysql_close($connection); ?> <input type="Submit" name="submit" value="Add"> </form> </fieldset>
-
CREATE TABLE `testimonial` ( `Client` varchar(250) NOT NULL, `Date` varchar(250) NOT NULL, `Testimonial` text NOT NULL, `Id` int(4) NOT NULL auto_increment, `Website` varchar(250) NOT NULL, `loginid` int(5) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;[code] i doubt the table structure is needed but who knows
-
heres the code im sure im missing something easy as hell (long day)
<?php session_start( ); //bored of this function yet? if(!isset($_SESSION["username"])) { header('Location: index.php'); } else { include("header.php"); // validate text input fields $Client = mysql_escape_string(trim(htmlentities($_GET['Client']))); $Date = mysql_real_escape_string(trim(stripslashes($_POST['Date']))); $Website = mysql_real_escape_string(trim(stripslashes($_POST['Website']))); $Testimonial = mysql_real_escape_string(trim(stripslashes($_POST['Testimonial']))); $loginid = mysql_real_escape_string(trim(stripslashes($_POST['loginid']))); // open database connection $conn = mysql_connect(HOST, DBUSER, PASS) or die('Could not connect !<br />Please contact the site\'s administrator.'); $db = mysql_select_db(DB) or die('Could not connect to database !<br />Please contact the site\'s administrator.'); // generate and execute query $query = "UPDATE testimonial SET Website = '$Website', Date = '$Date', Testimonial = '$Testimonial' WHERE Client = '$Client'"; $result = mysql_query($query) or die ("Error in query: $query. " . mysql_error()); echo $query; } ?>
the echo query is in there to test this and displays
UPDATE testimonial SET Website = 'http://www.imagesbytroy.com', Date = 'January 24, 2009', Testimonial = 'test' WHERE Client = 'imagesbytroy'
which is exactly right but when the script runs it just removes all data from all the fields im trying to update
-
try:
edit: why don't you just make it a password field in the first place?
I assume its not password as he sets a defualt value to it and adding a default to a password field would only display********* instead of the word password
-
by theme do you mean like different style sheets??
http://dropfaithproductions.com/themes.php?Theme=2
like so?
-
google will blacklist that site in no time then probably ban your adsense account because of this..
How to get stock symbols list??
in PHP Coding Help
Posted
http://www.eoddata.com/Symbols.asp
you can download the list in many formats