PHP - Moved: Quick Zend Question
This topic has been moved to Other Libraries and Frameworks.
http://www.phpfreaks.com/forums/index.php?topic=345426.0 Similar TutorialsThis topic has been moved to Application Frameworks. http://www.phpfreaks.com/forums/index.php?topic=320893.0 This topic has been moved to Other. http://www.phpfreaks.com/forums/index.php?topic=327935.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=356626.0 This topic has been moved to Application Frameworks. http://www.phpfreaks.com/forums/index.php?topic=354544.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=328743.0 This topic has been moved to Application Frameworks. http://www.phpfreaks.com/forums/index.php?topic=330453.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=347443.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=324009.0 This topic has been moved to Application Frameworks. http://www.phpfreaks.com/forums/index.php?topic=353397.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=319964.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=347122.0 hey! I have a site where I want to use multiple issets at the same time, like if I have four buttons and four issets: if(isset($_POST['one'])) { echo '<div class="example_box">one</div>'; } if(isset($_POST['two'])) { echo '<div class="example_box">two</div>'; } if(isset($_POST['three'])) { echo '<div class="example_box">three</div>'; } if(isset($_POST['four'])) { echo '<div class="example_box">four</div>'; } but for some reason it seems like only one isset can be activate at a time, is there any way to work this out or something :s? I've tried some variants of elseif stuff and such, but yeah, I'm pretty new at this stuff I am starting to learn PDO by re-writing one of my existing scripts. Do I still need to validate $_GET or does PDO do the work for me? Currently I am using: Code: [Select] $id = $_GET['id']; $sth = $dbh->prepare('DELETE FROM van_reservations WHERE id = :id'); $sth->bindParam(':id', $id, PDO::PARAM_INT); $sth->execute(); I used to validate by using this: Code: [Select] $id = isset($_GET['id']) && is_numeric($_GET['id'])?(int) $_GET['id']:0; Is there a way to only output the first, say, 30 words of a variable? I have a way to do it in mind, but seems like it's messy and not practical. Any suggestions? E.g: WITHOUT LIMIT: Welcome to my store. Would you like to buy something? We have really good noodles and fishes in doodle pools. WITH LIMIT: Welcome to my store. Would you like... Sort of like a short preview. hi. when i get into some function manual and there is a note says. Quote This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged. . is that meaning that after 5.3.0 version this function will not be supported? thanks , Mor. code <?php //storecodefound.php v1.0 //purpose is to store the http refer and the code associated with the site to a db to be collected and verified by submitcode.php $code = $_GET['code']; $site = $_SERVER['HTTP_HOST']; //check to see if the code already present $connect = mysql_connect("localhost","root","") or die (mysql_error()); $check = mysql_query("SELECT code FROM hunter.codes WHERE code='$code'") or die (mysql_error()); $row = mysql_num_rows($check); echo "result of \$row is ".$row; echo "<br />"; if ($row = 0) { //insert into db cause it's not there mysql_query("INSERT INTO hunter.codes (id, code, site) VALUES ('','$code','$site')") or die (mysql_error()); } else { //echo it's already here echo "Code already found on server!"; } ?> my question is the result of $row is infact 0 and the if statement says if $row is 0 to insert into db and instead it's given me the code is already found? What is the difference between these two lines Code: [Select] !isset($_POST[$requiredField]) and Code: [Select] !$_POST[$requiredField] how to open a site with curl that has frames ? when ive tried it gives "your broswer does not support frames" ... hey guys i have a script that creates a cookie named "MyLoginPage" now everything works well the cookie is saved and it keeps the user logged in The Question ok so im wanting to create a link that will delete the cookie so when the user clicks the link it will delete the cookie is this possible?? if so, how?? many thanks Does storing multiple values in 1 database field with a varchar let's say set at 150, all separated by "|'s" so I don't have to create a field name for each one is it better performance wise or no? (storing 6-7 different |'s that will be outputted with a array ofc) ? |