QuickOldCar
Staff Alumni-
Posts
2,972 -
Joined
-
Last visited
-
Days Won
28
Everything posted by QuickOldCar
-
What is the ideal / proper way to deal with SESSIONs ?
QuickOldCar replied to moose-en-a-gant's topic in PHP Coding Help
You have a typo $_SESSOIN["user"]=$userrname; should be $_SESSION['user']=$userrname; -
check out: lenovo g 780 WLAN connection in-stable: which driver needed?
QuickOldCar replied to Maze's topic in Miscellaneous
Is WLAN AutoConfig service set to automatic and running? -
If ebay ever let you add that into a listing they were messing up, usually sites only allow html and some javascript in posts. http://pages.ebay.com/help/policies/listing-javascript.html As for your own site, assumes the local path within own server <?php include('terms.php'); ?> You can use the servers document root as well <?php include($_SERVER['DOCUMENT_ROOT']."terms.php"); ?> dirname is another way <?php include(dirname(__FILE__) . 'terms.php'); ?> I like to do it this way to deal with the separators <?php include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'terms.php') ?> including external sites file_get_contents <?php $terms = file_get_contents('http://www.example.com/terms.php'); echo $terms; ?> curl as NotionCommotion mentioned iframe it and do the sizing <iframe src="http://www.example.com/terms.php"></iframe>
-
First start off fixing all your html in your form, is many values missing an equals or even duplicate name. <input type="text" id="req-phone" name="req-phone" class="required" maxlength="12" value="<?php echo $_COOKIE["NA-Phone"]; ?>" /> no name or value? <input type="text" id="ext" /> <input type="text" id="fax" /> <div class="rowElemSelect"> <label for="policy">Policy #:</label> <input type="text" name="lic_pl" id="lic_pl"> 2 different names this one <input type="radio" name="location" id="alt-loc" name="loc" value="At Another Location" /> Is a few other things but would require nearly starting over.
-
You should be using something like password_hash() for passwords and also escaping any input for queries with mysqli_real_escape_string() account <?php session_start(); error_reporting(E_ALL | E_NOTICE); ini_set('display_errors', '1'); include("includes/db.php"); if (isset($_SESSION['customer_username'])) { echo "<script>alert('Not')</script>"; } else { echo "<script>alert('Works')</script>"; } ?> <!DOCTYPE html> <html> <head> <title>MyAccount | mSocials</title> <link href='css.css' rel='stylesheet' /> </head> <body> <div id='header'> <br/> <?php $user = $_SESSION['customer_username']; $credits = mysqli_query($con, "SELECT credits from customers where customer_username= '$user'"); $row = mysqli_fetch_assoc($credits); $credit = $row["credits"]; if (isset($_SESSION['customer_username'])) { echo "<h1>Welcome " . $_SESSION['customer_username'] . " to UserPanel. You have " . $credit . " Credits to spend on our services.</h1>"; } ?> </div> <div id='content'> <?php if (!isset($_GET['purchase_services'])) { if (!isset($_GET['my_orders'])) { if (!isset($_GET['price_list'])) { if (!isset($_GET['purchase_credits'])) { if (!isset($_GET['edit_account'])) { echo " <div id='first'> <a href='my_account.php?purchase_services'> <img src='images/add.png' height='200' /> </a> <p>Add Order</p> </div> <div id='second'> <a href='my_account.php?my_orders'> <img src='images/search.png' height='200' /></a> <p>View all orders</p> </div> <div id='third'> <a href='my_account.php?price_list'><img src='images/Illustration%20Of%20Dollar%20Signs.png' height='200' /></a> <p>Price List</p> </div> <div id='fourth'> <a href='my_account.php?purchase_credits'><img src='images/deposit.png' height='200' /></a> <p>Purchase Credits</p> </div> <div id='fifth'> <a href='my_account.php?edit_account'><img src='images/profile-icon.png' height='200' /></a> <p>View/Edit your profile</p> </div> <div id='sixth'> <a href='logout.php'><img src='images/300px-Crystal_Clear_action_exit.svg.png' height='200' /></a> <p>LogOut</p> </div>"; } } } } } if (isset($_GET['edit_account'])) { include('includes/edit_account.php'); } if (isset($_GET['purchase_credits'])) { include('includes/purchase_credits.php'); } if (isset($_GET['price_list'])) { include('includes/price_list.php'); } if (isset($_GET['my_orders'])) { include('includes/my_orders.php'); } if (isset($_GET['purchase_services'])) { include('purchase_services'); } ?> </div> <div id='footer'> <br /> <br /> <a id='copyright' href='#'>Copyright © 2014 mSocials.com. All rights reserved</a> </div> </body> </html> login <?php session_start(); error_reporting(E_ALL | E_NOTICE); ini_set('display_errors', '1'); include("includes/db.php"); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>mSocials UserLogIn</title> <style> /*! normalize.css v3.0.2 | MIT License | git.io/normalize */ html{ font-family:sans-serif; -ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; } body{ margin:0; } article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{ display:block; } audio,canvas,progress,video{ display:inline-block; vertical-align:baseline; } audio:not([controls]){ display:none; height:0; } [hidden],template{ display:none; } a{ background-color:transparent; } a:active,a:hover{ outline:0; } abbr[title]{ border-bottom:1px dotted; } b,strong{ font-weight:bold; } dfn{ font-style:italic; } h1{ font-size:2em; margin:0.67em 0; } mark{ background:#ff0; color:#000; } small{ font-size:80%; } sub,sup{ font-size:75%; line-height:0; position:relative; vertical-align:baseline; } sup{ top:-0.5em; } sub{ bottom:-0.25em; } img{ border:0; }svg:not(:root){ overflow:hidden; } figure{ margin:1em 40px; } hr{ -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; height:0; } pre{ overflow:auto; } code,kbd,pre,samp{ font-family:monospace, monospace; font-size:1em; } button,input,optgroup,select,textarea{ color:inherit; font:inherit; margin:0; } button{ overflow:visible; } button,select{ text-transform:none; } button,html input[type="button"],input[type="reset"],input[type="submit"]{ -webkit-appearance:button; cursor:pointer; } button[disabled],html input[disabled]{ cursor:default; } button::-moz-focus-inner,input::-moz-focus-inner{ border:0; padding:0; } input{ line-height:normal; } input[type="checkbox"],input[type="radio"]{ -webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box; padding:0; } input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{ height:auto; } input[type="search"]{ -webkit-appearance:textfield; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; } input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{ -webkit-appearance:none; } fieldset{ border:1px solid #c0c0c0; margin:0 2px; padding:0.35em 0.625em 0.75em; } legend{ border:0; padding:0; } textarea{ overflow:auto; } optgroup{ font-weight:bold; } table{ border-collapse:collapse; border-spacing:0; } td,th{ padding:0; } </style> <style> @import url(http://fonts.googleapis.com/css?family=Open+Sans); .btn { display: inline-block; *display: inline; *zoom: 1; padding: 4px 10px 4px; margin-bottom: 0; font-size: 13px; line-height: 18px; color: #333333; text-align: center;text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); vertical-align: middle; background-color: #f5f5f5; background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); background-image: linear-gradient(top, #ffffff, #e6e6e6); background-repeat: repeat-x; filter: progid:dximagetransform.microsoft.gradient(startColorstr=#ffffff, endColorstr=#e6e6e6, GradientType=0); border-color: #e6e6e6 #e6e6e6 #e6e6e6; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); border: 1px solid #e6e6e6; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); cursor: pointer; *margin-left: .3em; } .btn:hover, .btn:active, .btn.active, .btn.disabled, .btn[disabled] { background-color: #e6e6e6; } .btn-large { padding: 9px 14px; font-size: 15px; line-height: normal; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } .btn:hover { color: #333333; text-decoration: none; background-color: #e6e6e6; background-position: 0 -15px; -webkit-transition: background-position 0.1s linear; -moz-transition: background-position 0.1s linear; -ms-transition: background-position 0.1s linear; -o-transition: background-position 0.1s linear; transition: background-position 0.1s linear; } .btn-primary, .btn-primary:hover { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); color: #ffffff; } .btn-primary.active { color: rgba(255, 255, 255, 0.75); } .btn-primary { background-color: #4a77d4; background-image: -moz-linear-gradient(top, #6eb6de, #4a77d4); background-image: -ms-linear-gradient(top, #6eb6de, #4a77d4); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#6eb6de), to(#4a77d4)); background-image: -webkit-linear-gradient(top, #6eb6de, #4a77d4); background-image: -o-linear-gradient(top, #6eb6de, #4a77d4); background-image: linear-gradient(top, #6eb6de, #4a77d4); background-repeat: repeat-x; filter: progid:dximagetransform.microsoft.gradient(startColorstr=#6eb6de, endColorstr=#4a77d4, GradientType=0); border: 1px solid #3762bc; text-shadow: 1px 1px 1px rgba(0,0,0,0.4); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.5); } .btn-primary:hover, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] { filter: none; background-color: #4a77d4; } .btn-block { width: 100%; display:block; } * { -webkit-box-sizing:border-box; -moz-box-sizing:border-box; -ms-box-sizing:border-box; -o-box-sizing:border-box; box-sizing:border-box; } html { width: 100%; height:100%; overflow:hidden; } body { width: 100%; height:100%; font-family: 'Open Sans', sans-serif; background: #092756; background: -moz-radial-gradient(0% 100%, ellipse cover, rgba(104,128,138,.4) 10%,rgba(138,114,76,0) 40%),-moz-linear-gradient(top, rgba(57,173,219,.25) 0%, rgba(42,60,87,.4) 100%), -moz-linear-gradient(-45deg, #670d10 0%, #092756 100%); background: -webkit-radial-gradient(0% 100%, ellipse cover, rgba(104,128,138,.4) 10%,rgba(138,114,76,0) 40%), -webkit-linear-gradient(top, rgba(57,173,219,.25) 0%,rgba(42,60,87,.4) 100%), -webkit-linear-gradient(-45deg, #670d10 0%,#092756 100%); background: -o-radial-gradient(0% 100%, ellipse cover, rgba(104,128,138,.4) 10%,rgba(138,114,76,0) 40%), -o-linear-gradient(top, rgba(57,173,219,.25) 0%,rgba(42,60,87,.4) 100%), -o-linear-gradient(-45deg, #670d10 0%,#092756 100%); background: -ms-radial-gradient(0% 100%, ellipse cover, rgba(104,128,138,.4) 10%,rgba(138,114,76,0) 40%), -ms-linear-gradient(top, rgba(57,173,219,.25) 0%,rgba(42,60,87,.4) 100%), -ms-linear-gradient(-45deg, #670d10 0%,#092756 100%); background: -webkit-radial-gradient(0% 100%, ellipse cover, rgba(104,128,138,.4) 10%,rgba(138,114,76,0) 40%), linear-gradient(to bottom, rgba(57,173,219,.25) 0%,rgba(42,60,87,.4) 100%), linear-gradient(135deg, #670d10 0%,#092756 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3E1D6D', endColorstr='#092756',GradientType=1 ); } .login { position: absolute; top: 50%; left: 50%; margin: -150px 0 0 -150px; width:300px; height:300px; } .login h1 { color: #fff; text-shadow: 0 0 10px rgba(0,0,0,0.3); letter-spacing:1px; text-align:center; } input { width: 100%; margin-bottom: 10px; background: rgba(0,0,0,0.3); border: none; outline: none; padding: 10px; font-size: 13px; color: #fff; text-shadow: 1px 1px 1px rgba(0,0,0,0.3); border: 1px solid rgba(0,0,0,0.3); border-radius: 4px; box-shadow: inset 0 -5px 45px rgba(100,100,100,0.2), 0 1px 1px rgba(255,255,255,0.2); -webkit-transition: box-shadow .5s ease; -moz-transition: box-shadow .5s ease; -o-transition: box-shadow .5s ease; -ms-transition: box-shadow .5s ease; transition: box-shadow .5s ease; } input:focus { box-shadow: inset 0 -5px 45px rgba(100,100,100,0.4), 0 1px 1px rgba(255,255,255,0.2); } </style> <script src="js/prefixfree.min.js"></script> </head> <body> <div class="login"> <h1>Login</h1> <form method="post"> <input type="text" name="u" placeholder="Username" required="required" /> <input type="password" name="p" placeholder="Password" required="required" /> <button type="submit" class="btn btn-primary btn-block btn-large" name="login">LogIn</button> </form> <button class="btn btn-primary btn-block btn-large" onclick="window.location='index.php'">Back to Home Page </button> </div> <script src="js/index.js"></script> </body> </html> <?php if (isset($_POST['login'])) { if (isset($_POST['u']) && trim($_POST['u']) != '') { $c_user = trim($_POST['u']); } if (isset($_POST['p']) && trim($_POST['p']) != '') { $c_pass = trim($_POST['p']); } if (isset($c_user) && isset($c_pass)) { if (mysqli_connect_errno()) { echo mysqli_connect_error(); } $set_c = "select * from customers where customer_password = '$c_pass' AND customer_username = '$c_user'"; $run_c = mysqli_query($con, $set_c) or die(mysqli_error($con) . " query: " . $set_c); $check_customer = mysqli_num_rows($run_c); if ($check_customer == 1) { $_SESSION['customer_username'] = $c_user; echo "<script>alert('Successfull LogIn')</script>"; echo "<script>window.open('customer/my_account.php','_self')</script>"; } else { echo "<script>alert('Username or Password is incorrect.')</script>"; exit(); } } } ?>
-
Call a friend was a Who Wants to Be a Millionaire joke. Meaning if it gets too confusing call someone for help. I believe all modern browsers support it now, older IE always has issues, I wish people would stop using it.
-
While wordpress is written using php it's created all sorts of it's own functions to use that is not directly related to php. It takes people familiar with both wordpress codex and php to get what you want done. A lot of times if you request a feature to the plugin developer they make additions. The developer has the biggest advantage knowing what they did in creating the plugin. (It's not always obvious) As mac_gyver said is a purchased script which means the creator would not want it published for free in any manner, this alone makes it difficult for anyone to assist you in a public forum. Contacting the developer of that plugin is the step I would take with it if I was you. Lets see if can try and answer some of your questions. You would need to add a new field to store the results, or somehow query all results that specific field. There may be a creation and select query in the plugin, it may be able to be obtained in a function, without seeing it completely is hard to say. Mentioned above about the additional field, possibly would need a new table associating users or items? Autoupdate could be done by adding jquery or ajax to keep polling the current auction results. Most people here would make their own script to do it all and not modify someone else's script let alone try to mingle two scripts and modify it. What's easier? Something that you can accomplish. Easier to me would be to find a script that does everything you need it to do, or as close as possible with minor modifications. This statement here is why I suggest to contact the developer or visit the freelance section to hire someone who can do this. It would be nice if can do it yourself, sometimes have to be realistic.
-
If really want to do form validation is a lot can implement using html5 and show error messages right there. Instead of an alert if fails server validation can display a message via ajax in a divider. Can even go so far to only show a submit button if passes your form validation. I want to say have a "call a friend" feature being a smartass, depends how complicated want to get with a simple form.
-
If you want to support multi languages and characters you should be detecting and converting to utf-8 and save it to database as so. iconv It's tough to do everything, someone made an arabic class to help with it http://sourceforge.net/projects/ar-php/files/ar-php/
-
I don't see your reasoning to have multiple forms and buttons with automatic redirect/submissions. Sure you can do a pile of forms and submits in addition to a pile header or javascript redirects, even redirect them to the url, but why do that? You can do one text field and button and process it all in the background then show a completed result. Or a form with multiple text fields,select,radio,checkbox,etc... If you needed to show additional options that will be dependent from what the user fills out in a form...use jquery or a combination of javascript and ajax. They make an api that you can incorporate searches and show results. youtube api version 3.0 I'll show you what I did, I have a youtube crawler with playlists and user ripper, adds single videos to my own database. Then I made my own search and api to display results. http://dynainternet.com/dynavid/search/index.php?s=full%20movie%20-trailer%20-preview%20-review%20-scene&size=400&startrow=5&max=5&display=id&order=desc&format=html&width=400&height=400
-
This is the link, is a small one under the large green link. http://sourceforge.net/projects/filezilla/files/latest/download?nowrap& I found it sad that sourceforge is doing this, is some really nasty ones in the bunch.
-
In the simplest way if(isset($_GET['url']) && trim($_GET['url']) != ''){ echo "<iframe src='".$_GET['url']."'></iframe>"; } Iframing websites is horrible, blank pages, jump out of frame scripts,redirects and so on. Also have the iframe sizing issues versus clients browser size. Google will be a white page. Any reason to try and iframe this when someone can visit there?
-
Use browsers built in developer tools such as Dom Inspector to locate where it is in your code.
-
The semicolons were also missing in the original code for the style attributes.
-
Just went and downloaded filezilla through sourceforge and ended up 784 viruses,malware and browser redirects. Also a new optimizer pro that malwarebytes does not remove, had to unlock files,rename and manually remove it all. The problem is the sourceforge installer. I usually try to get my files from filehippo because I trust them more. http://filehippo.com/download_filezilla It's pretty sad can't trust sourceforge any longer.
-
Welcome aboard. You appear to be a "Basic" guy
-
Reply is a little slow, but here if need it. Creating your own VOIP is not easy, can use java,C,Flash... Depends what type of communication you want and how those clients connect. Instead I'll link you to things that you might possibly take advantage from. With seeing some of the terminology you can research it more. http://socket.io/ http://socket.io/get-started/chat/ requiring nodejs http://www.webrtc.org/ https://github.com/ging/licode/tree/master/erizo http://sourceforge.net/projects/mcumediaserver/ http://www.adhearsion.com/ http://help.voxeo.com/go/help/xml.vxml.voicexml https://www.tropo.com/ http://public.ifbyphone.com/ (was cloudvox) http://voicechatapi.com/ If going pc to pc why not just use something like IRC
-
C and C++ without an IDE on Ubuntu 14.04
QuickOldCar replied to sKunKbad's topic in Other Programming Languages
If still want to do the way you are is fine, but these ide's are just fine. https://netbeans.org/ http://www.codeblocks.org/ -
Unable to scroll my website on android chrome and safari
QuickOldCar replied to ammzy's topic in Javascript Help
Get them FTP access so they can help. Or you wait for them to post a solution. http://support.themeblvd.com/forums/forum/v2-themes/swagger/ I doubt anyone will sift through a paid theme and fix it...especially when nobody can see the code. -
I agree with all above comments, the more you know the better you become. It almost comes down to your imagination on this, you can run local applications and use the data from them. So basically if can be ran on an OS you can take advantage of it in some way. json is supported many languages, can focus on making them work together that way. http://php.net/json If you really want to do more and get serious, time to get a dedicated or good vps hosting. Otherwise besides serving normal webpages and low traffic it's usually considered too much usage. I use a vps and run some demanding scripts on it, my host never seems to have an issue.
-
running smart in OpenSuse 13.2 - or on Gparted-Live DVD
QuickOldCar replied to Maze's topic in Linux
You need to install it, showed you commands other post sudo apt-get install smartmontools For some good tools any os is hirens boot cd http://www.hiren.info/pages/bootcd http://www.hirensbootcd.org/download/ No it's not, you can see what packages they include on their page, scroll down. http://gparted.org/livecd.php There is no magical way software fixes failing harddrives, just to see them broken, wipe data, format, partition them, etc. If the harddrive is giving issues I suggest copy the data before you can't. I usually do the freeze trick for bad ones long enough to copy the data or find a harddrive the same and swap the platters or logic board. -
What I suggested was for windows, not linux. To troubleshoot the pc on boot can unplug any devices and check still. For linux harddrive tools sudo apt-get install smartmontools sudo smartctl -l selftest /dev/sda sudo smartctl -a /dev/sda | less
-
Use a normal user log in using password-hash() with sessions
-
connection goes first mysqli mysqli_select_db($dbhandle,"notes"); then need to run a query if ($result = mysqli_query($dbhandle, $mysqli)) { echo "inserted"; } As for the post variables, check them first before even perform any mysql queries is database name pc_notes or notes? The mysqli connection already sets the database unless need to change to something different complete code if(isset($_POST['techname']) && trim($_POST['techname']) != ''){ $techname = trim($_POST['techname']; } if(isset($_POST['date']) && trim($_POST['date']) != ''){ $date = trim($_POST['date']; } if(isset($techname) && isset($date)){ $hostname = "localhost"; $username = "root"; $password = ""; $dbname = "pc_notes"; $dbhandle = mysqli_connect($hostname, $username, $password, $dbname); //if need to change database different than in the connection //mysqli_select_db($dbhandle,"notes"); $mysqli ="INSERT INTO notes (techname, date) VALUES ('$techname','$date')"; if ($result = mysqli_query($dbhandle, $mysqli)) { echo "inserted"; } mysqli_close($dbhandle); } Next would be checking data types and escaping the values before inserting mysqli_real_escape_string
-
Use mysqli, I saw you had both in these posts.