-
Posts
252 -
Joined
-
Last visited
Everything posted by ryanfilard
-
When my power was out this morning I went down stairs and almost fainted. But now my basement is drained and I am no longer going to host servers down there. Well. I feel very lucky as Philip said.
-
I just got of the phone they cover it. Such a relief. I was on hold for a half and hour.
-
The guy I hired to reseal my basement probably didn't do the job right.
-
I dont have flood insurance 5 grand down the drain.
-
2 days ago I just set up a home server system in my basement. Well... It rained a lot and my basement flooded. FML. I had the equipment listed on my insurance do you think they would cover water damage? :-\
-
I like the site but your header is way too big.
-
Is there an API that I can use to determine the average selling price of an ebay item? I searched google but could not find an answer. I though of using preg_match
-
I am just starting with Objective C and was wondering how to put a string inside a string. I have @"mytext" I want the existing string to go here @"my[OTHERSTRING]text"
-
I have been searching but could not seem to find out how to display if it way AM/PM in a separate string.
-
If there are files in the folder that have stuff like <?PHP //MY CODE ?> I don't want the code to process. If someone loaded the page the output would be <?PHP //MY CODE ?>
-
Is it possible for php to not process files in a certain folder.
-
Before processing any sql if the user is not logged in it will not load the page.
-
Verification: http://goo.gl/yVLKm Website: http://goo.gl/2aiey Frontend Demo: http://goo.gl/UwHqS Dashboard Demo: http://goo.gl/6Gr8X (Please don't delete the homepage.) Username: admin Password: pass I just released the next major version of my CMS. I re-programmed from the start because the previous version had to many bugs. Can you test it for errors it would really help. -Thanks
-
Thank you, this really helped.
-
US phone numbers are 7 digits long without the area code. Without Area Code: 444-4444 With Area Code: 555-444-4444
-
I have been trying to fix this for a really long time. It does not show an error on my local server but on my demo server it does.' What am I doing wrong? I have tried changing the location of the default.php file. I even tried require_once and require. Nothing worked. try logging in with random details with this link. You will see the error. http://goo.gl/3IetJ default.php <?php $hostname_default = "localhost"; $database_default = "mypass"; $username_default = "my_user"; $password_default = "my_pass"; $default = mysql_pconnect($hostname_default, $username_default, $password_default) or trigger_error(mysql_error(),E_USER_ERROR); ?> login.php <?php if (!isset($_SESSION)) { session_start(); } if (!empty($_REQUEST['password'])) { include("../Connections/default.php"); $username = $_REQUEST['username']; $password = md5(md5($_REQUEST['password'])+salt); mysql_select_db($database_default, $default); $login_check = "SELECT * FROM users WHERE username = '$username' AND password = '$password'"; $login = mysql_query($login_check, $default) or die(mysql_error()); $row_login = mysql_fetch_assoc($login); $val_login = mysql_num_rows($login); if ($val_login == '1') { $_SESSION['E_User'] = $row_login['username']; header('Location: index.php'); } else { header('Location: login.php?error=1&username='.$username.''); } } ?>
-
I wrote an update script, how secure do you think it is? By the way, this is an include. The page it is included on stop attacks by making sure the user is logged in. function update_file($url, $file) { //Get URL content $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $data = curl_exec($ch); curl_close($ch); $new_content = $data; //Replace with content from URL file_put_contents($file, $new_content); echo $new_content; } function get_url($file) { $domain = 'http://www.mysite.com/'; $folder = 'update/'; $ver = '2.0.1'; $full_url = ''.$domain.''.$folder.'/'.$ver.'/'; $fileu = array ( "functions/update.php" => "".$full_url."functions/update.txt" ); return $fileu[$file]; } $files = array ( 'functions/update.php' ); foreach($files as $file) { update_file(get_url($file),$file); }
-
Warning: mysql_select_db() expects parameter 2 to be resource
ryanfilard replied to ryanfilard's topic in PHP Coding Help
I fixed it, the file was included on the wrong page which already had that variable. -
Warning: mysql_select_db() expects parameter 2 to be resource
ryanfilard replied to ryanfilard's topic in PHP Coding Help
Its confusing because it still posts the data. -
Warning: mysql_select_db() expects parameter 2 to be resource
ryanfilard replied to ryanfilard's topic in PHP Coding Help
This is the code in the required file <?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_default = "localhost"; $database_default = "X"; $username_default = "X"; $password_default = "X"; $default = mysql_pconnect($hostname_default, $username_default, $password_default) or trigger_error(mysql_error(),E_USER_ERROR); //Get Elemata Pro User Data $ecms_user = "XXXX"; $ecms_password = "XXXX"; $ecms_key = "XXXX"; //Elemata Connection Information $site_id = "XXXXXX-XXXXX-XXXX-XXXXX"; //Do Not Change This ID $action_key = "XXXXXXXXXXXXX-XXXXXXXXXX-XXXXXXXXX-XX"; //Do Not Change This Key ?> -
I have created a script to insert data into a database, but it returns this. Warning: mysql_select_db() expects parameter 2 to be resource, null given in /RJFWS198/testing/elemata_project/admin/elements/create_page.php on line 51 Here is the code <?PHP //Protect Against Attacks if (empty($_SESSION['E_User'])) { die("Access Denied"); } ?> <?php if (!empty($_REQUEST['title']) && (!empty($_SESSION['E_User']))) { require_once('../Connections/default.php'); if (empty($_REQUEST['password'])) { $password = "0"; }else{ $password = $_REQUEST['password']; } if (empty($_REQUEST['menu_order'])) { $mo = "0"; }else{ $mo = $_REQUEST['menu_order']; } if (empty($_REQUEST['meta_keywords'])) { $meta_keywords = "0"; }else{ $meta_keywords = $_REQUEST['meta_keywords']; } if (empty($_REQUEST['meta_desc'])) { $meta_desc = "0"; }else{ $meta_desc = $_REQUEST['meta_desc']; } if (empty($_REQUEST['meta_copyright'])) { $meta_copyright = "0"; }else{ $meta_copyright = $_REQUEST['meta_copyright']; } $author = $_SESSION['E_User']; $date = date("m.d.y"); $day = date("d"); $month = date("n"); $year = date("Y"); $time = ''.date("g").''.date("i").''.date("a").''; $ptitle = $_REQUEST['title']; $post_content = $_REQUEST['postContent']; $searchable = $_REQUEST['seachable']; $locked = $_REQUEST['privacy']; $tags = $_REQUEST['tags']; $meta_robots = $_REQUEST['robots']; mysql_select_db($database_default, $default); mysql_query("INSERT INTO posts (`time`, `year`, `month`, `day`, `date`, `author`, `title`, `content`, `searchable`, `locked`, `password`, `menu_order`, `tags`, `meta_keywords`, `meta_desc`, `meta_robots`, `meta_copyright`) VALUES ('$time', '$year', '$month', '$day', '$date', '$author', '$ptitle', '$post_content', '$searchable', '$locked', '$password', '$mo', '$tags', '$meta_keywords', '$meta_desc', '$meta_robots', '$meta_copyright')"); } ?>
-
I have used DownloadHelper for a long time. http://www.downloadhelper.net/
-
What is the ease of use factor for my website? http://bit.ly/zq2LMJ
-
I am making a content management system, but I thought it would be easier to make it have a drag and drop WYSIWYG editor. Is there a tutorial somewhere on how to make one? I looked and only found computer programs.
-
Thanks for your feedback. I have to clean up the URLS and fix the CSRF attacks but I already have meta tags.