QuickOldCar
Staff Alumni-
Posts
2,972 -
Joined
-
Last visited
-
Days Won
28
Everything posted by QuickOldCar
-
Wordpress Main Website Menu Not working properly
QuickOldCar replied to zille's topic in PHP Coding Help
Go see my site and keep clicking links sounds like spam to me. If it's a default wordpress menu, is most likely nothing can help with. If you coded it with a plugin or a script, add that to here with code tags, don't make people hunt for it willing to help you. -
Issue with updating database from checkboxes in table
QuickOldCar replied to Abundances's topic in PHP Coding Help
You are mixing mysqli_ and mysql_ functions $result = mysql_query($sql); -
Shouldn't these be... if ($image1) { $sql .= " , image = '$image1_name'"; } if ($image2) { $sql .= " , image2 = '$image2_name'"; }
-
Don't see your upload script for your first error, but it seems you have an extra comma image = ', B6405 Thumb.jpg' Then the id value should be wrapped single quotes and entire query wrapped with double quotes, you seem to have had 2 single quotes at the end. WHERE id = '64'" As for your second set of errors... you are trying to loop through what is expected to be an array, but above on line 21 you set $arrsizes = $_POST['size']; and same for the line 73 which is $arrcolors, on line 22 you have set as $arrcolors = $_POST['color']; header errors are appearing because your error messages are output before header can be sent, that will go away if have no errors or disable any error reporting.
-
Only work when click from same site, if pasted a link and clicked the hash mark along with fragment is ignored Is a shame people even use them, were more for navigating to tag sections on pages, portion of that document and not entire websites. You can click this link with no hash mark or fragment and will see your script generates them at random it seems. http://adzbaba.com/searchview/Casa-Rouge-3BHK-4BHK-Flats-For-Sale-9347362890-in-Hyderabad-14670093
-
Will not echo the new user welcome paragraph
QuickOldCar replied to Shadow_Walker's topic in PHP Coding Help
That's so hilarious I even liked it. -
Will not echo the new user welcome paragraph
QuickOldCar replied to Shadow_Walker's topic in PHP Coding Help
Are you saying you want to show the value of $_POST['student_id'] even if it does not exist? -
Search and signup doesn't do anything
-
Adobe Flash Player error when accessing the site?
QuickOldCar replied to seadragon1855's topic in Other Web Server Software
Read this entire page, should help with flash crashing issues. http://kb.mozillazine.org/Flash You aren't alone, lots have the same issues. -
Probably better to post to the source instead of some website about it. Every mysql_* related item has a large pink warning. http://www.php.net/manual/en/function.mysql-query.php
-
What's the best method to showing meta tags on a user based website?
QuickOldCar replied to man5's topic in PHP Coding Help
Is it fetching the meta by something that has a unique value like an id? Trying to add from an array a previous query and into a new loop? Too hard to possibly know why unless see some sort of code, maybe even more questions. -
Will not echo the new user welcome paragraph
QuickOldCar replied to Shadow_Walker's topic in PHP Coding Help
htmlspecialchars() isn't a fix all for that, if was numbers by chance would be better checking ctype_digit(), is_numeric() or something, depending exactly what the op expects it to be Ch0cu3r is just trying to help the guy along his immediate issues, not train him all aspects of coding. It's been said many times all over to never ever trust user input sanitize,filter and escape -
Looking at the documentation you edit config.php then visit http://localhost/phpbot404.php If all you want is a bot, it's much easier to use mirc to make your own scripts or download them from many places. If you want something for a website, consider lightirc or something like qwebirc Tried many irc frontends and most are undesirable, I love php, but have yet to find one irc frontend that actually can work well written in php.
-
Passing parameters and sending them another URL
QuickOldCar replied to chupacabrot's topic in PHP Coding Help
Instead of using $_SERVER['PHP_SELF'] (which is bad), just leave that blank as "" and will go to the same page as the form was submitted. -
What's the best method to showing meta tags on a user based website?
QuickOldCar replied to man5's topic in PHP Coding Help
Do as theirs, and if they never set theirs use yours. -
Take a look here, explains and shows example codes, it really depends what the purpose is. https://trac.ffmpeg.org/wiki/x264EncodingGuidehttps://trac.ffmpeg.org/wiki/x264EncodingGuide Is a lot of older ffmpeg codes out there, they were changed a few years ago. ffmpeg -i input -vcodec libx264 -preset fast -tune film -profile main -crf 22 -threads 0 output
-
Is there a malicious code scanner for PHP code?
QuickOldCar replied to OM2's topic in PHP Coding Help
Can try this, become a member there to download files. http://www.phpclasses.org/package/6476-PHP-Scan-script-files-for-malicious-code.html -
Ran through a formatter and used full php tags versus short ones. and...holy tables!! <?php session_start(); include_once "includes/db_connect.php"; if (strip_tags($_GET['logout']) == "yes") { session_destroy(); } elseif (isset($_SESSION['username'])) { header("Location: logged_in.php"); exit(); } if ($_POST['Submit'] && strip_tags($_POST['username']) && strip_tags($_POST['password'])) { $username = addslashes(strip_tags($_POST['username'])); $password = addslashes(strip_tags($_POST['password'])); $ip = $REMOTE_ADDR; $ud = mysql_num_rows(mysql_query("SELECT * FROM users")); //check INFO $sql = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password' AND activated='1' LIMIT 1"); $login_check = mysql_num_rows($sql); $inf = mysql_fetch_object($sql); if ($login_check == "0") { echo "<body bgcolor=#666666>You Have Typed an Incorrect Username or Password"; } elseif ($login_check != "0") { if ($login_check > "0") { if ($inf->status == "Dead") { include_once "dead.php"; exit(); } if ($inf->status == "Banned") { $encoded = md5(strtolower($username)); header("Location: banned.php?banned=$username&encoded=$encoded"); exit(); } session_register('username'); $_SESSION['username'] = $inf->username; $timestamp = time() + 60; mysql_query("UPDATE users SET online='$timestamp' WHERE username='$username'"); mysql_query("UPDATE users SET l_ip='$ip' WHERE username='$username'"); header("Location: logged_in.php"); } else { $message = "You could not be logged in.<br />"; } } } //MONEY IN GAME AND PER USER $result11111 = mysql_query("SELECT money, bank FROM users WHERE userlevel='0' AND status='Alive'"); $moneytot = 0; while ($row = mysql_fetch_array($result11111)) { $moneytot += $row[0] + $row[1]; } $nums = mysql_num_rows($result11111); $per_user = round($moneytot / $nums); $ud = mysql_num_rows(mysql_query("SELECT * FROM users")); //END //SITE STATS $site = mysql_fetch_object(mysql_query("SELECT * FROM site_stats WHERE id='1'")); //END //FORUM TOPICS $totaltopics = mysql_num_rows(mysql_query("SELECT id FROM topics")); //?END //USERS DEAD $dead = mysql_num_rows(mysql_query("SELECT username FROM users WHERE status = 'Dead' AND modkill = '0'")); $banned = mysql_num_rows(mysql_query("SELECT username FROM users WHERE status = 'Banned'")); //TOTAL ATTEMPTS $attempts = mysql_num_rows(mysql_query("SELECT id FROM attempts WHERE outcome = 'Survived' OR outcome = ''")); //?END $result11111swiss = mysql_query("SELECT money FROM swiss"); $moneyswiss = 0; while ($rowswiss = mysql_fetch_array($result11111swiss)) { $moneyswiss += $rowswiss[0]; } ?> <html> <head> <link rel="shortcut icon" href="favicon.ico.png"> <title>Way Of The Mafia</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="includes/in.css" rel="stylesheet" type="text/css"> <style type="text/css"> A:link, { COLOR:#999999; font-family:"Arial", serif; FONT-WEIGHT:bold; font-size:12px; TEXT-DECORATION:none } body { background-attachment: fixed; background-image: url(images/index/loginbg.jpg); background-position: bottom right; } .style4 { font-size: 18px; font-color: #FFFFFF; } .style9 { color: #000000; } .style13 { color: #FFFFFF; } .style14 { color: #000000; font-weight: bold; font-family: Geneva, Arial, Helvetica, sans-serif; } .style16 { color: #CCCCCC; } .style17 { color: #0099FF; } .style18 { color: #00FF00; } .style19 { color: #FF0000; } .button { -moz-box-shadow:inset 0px 1px 0px 0px #ffffff; -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; box-shadow:inset 0px 1px 0px 0px #ffffff; background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9) ); background:-moz-linear-gradient( center top, #f9f9f9 5%, #e9e9e9 100% ); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9'); background-color:#f9f9f9; -webkit-border-top-left-radius:0px; -moz-border-radius-topleft:0px; border-top-left-radius:0px; -webkit-border-top-right-radius:0px; -moz-border-radius-topright:0px; border-top-right-radius:0px; -webkit-border-bottom-right-radius:0px; -moz-border-radius-bottomright:0px; border-bottom-right-radius:0px; -webkit-border-bottom-left-radius:0px; -moz-border-radius-bottomleft:0px; border-bottom-left-radius:0px; text-indent:0; border:1px solid #dcdcdc; display:inline-block; color:#666666; font-family:Impact; font-size:15px; font-weight:bold; font-style:normal; height:40px; line-height:40px; width:100px; text-decoration:none; text-align:center; text-shadow:1px 1px 0px #ffffff; } .button:hover { background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #e9e9e9), color-stop(1, #f9f9f9) ); background:-moz-linear-gradient( center top, #e9e9e9 5%, #f9f9f9 100% ); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e9e9e9', endColorstr='#f9f9f9'); background-color:#e9e9e9; } .button:active { position:relative; top:1px; } .table1 { width:auto; max-width:100%; display:inline-block; float:none; } .table2 { width:auto; max-width:100%; display:inline-block; float:left; } input, select, textarea{ color: #ffffff; } </style> </head> <?php $timenow = time(); $select = mysql_query("SELECT * FROM users WHERE online > '$timenow' ORDER by id"); $num = mysql_num_rows($select); ?> <p align="center"> <img src="images/banner.jpg"> <BR><BR> <table bgcolor=black width="20%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor=black class="thinline"> <tr> <td> <center> Login </td> </tr> <tr> <td> <form action='index.php' method='post'> <div align="center"> <br /> <span class="style4"> <font color=#FFFFFF> Username: <input name="username" class="thinline" type="text" id="username" value="<?php if (strip_tags($_GET['l'])) { echo "$l"; } ?>" size="15" maxlength="40"> </div> <div align="center"> <span class="style4"> Password: <font color="white"><input name="password" type="password" class="thinline" id="password2" value="<?php if (strip_tags($_GET['pw'])) { echo "$pw"; } ?>" size="15" maxlength="40"> </span> </div> <center> <input name="Submit" colspan="4" type="Submit" id="Submit" value="Login" class="button"> <br /> <tr> <p align="center"> <a href="register.php"><img src="images/index/reglink.png" alt="register" ismap></a> <a href="lost.php"><img src="images/index/lplink.png" ismap></a><br /> <br /> </p> </td> </tr> </table> <label> </label> <div align="center"> <p> </div> </form> <br><br><br> <table class=table2> <center>     <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <table bgcolor=black width=25% class="table1"> <td> </td> <table bgcolor=black class="table2" height=33%><tr class="thinline"> <td colspan=2> Last 5 Registered</td> </tr> <tr class=table> <td class="subhead" width="109">Username</td> </tr> <?php $c = mysql_query("SELECT * FROM users ORDER BY id DESC LIMIT 5"); while ($d = mysql_fetch_object($c)) { echo "<tr><td align=center>$d->username</td></tr>"; } ?> <table bgcolor="black" class="table2" height=33%> <tr align="center" class="thinline"> <td colspan=2> Last 5 Killed</td> </tr> <tr class=table> <td class="subhead" width="109">Username</td> </tr> <?php $e = mysql_query("SELECT * FROM users WHERE status='Dead' AND modkill='0' ORDER BY killed_on DESC LIMIT 5"); while ($f = mysql_fetch_object($e)) { $dae = mysql_fetch_object(mysql_query("SELECT * FROM dead WHERE username='$f->username'")); echo "<tr><td align=center>$f->username</td></tr>"; } ?> <table bgcolor="black" class="table2" height=33%><tr align="center" class="thinline"> <td colspan=2> Top 5 Players</td> </tr> <tr class=table> <td class="subhead" width="109">Username</td> </tr> <?php $tsel = mysql_query("select * from `users` where `userlevel`='0' and `status`='alive' order by `rankpoints` desc limit 5"); while ($top = mysql_fetch_array($tsel)) { echo "<tr><td align=center>$top[username]</td></tr>"; } ?> <table bgcolor="black" class="table2" height=33%> <tr class="thinline"> <td colspan=2> Site Stats</td> </tr> </tr> <tr> <td width="40%" align=right>Total Users:</td> <td width="60%" align=center> <?php echo "$ud"; ?> </td> </tr> <tr> <td width="40%" align=right>Game Money:</td> <td width="60%" align=center> <?php echo "£$moneytot"; ?> </td> </tr> <tr> <td width="40%" align=right>Users Dead:</td> <td width="60%" align=center> <?php echo "$dead"; ?> </td> </tr> <tr> <td width="40%" align=right>Users Banned:</td> <td width="60%" align=center> <?php echo "$banned"; ?> </td> </tr> <tr> <td width="40%" align=right>Attempted Murders:</td> <td width="60%" align=center> <?php echo "$attempts"; ?> </td> </tr> </table> </table> </td> </table> </body> </html>
-
One thing you can do to remove those notices is define the array $SongArray = array(); You can also check if it's actually an array if(is_array($SongArray)){ And maybe check your file permissions for SongOrganizer/songs.txt
- 3 replies
-
- shuffle()
- switch statement
-
(and 3 more)
Tagged with:
-
Don't you set what encoder to use? You can try setting the bitrate to somewhere around -b 400k , and see how it does. If neither -b:v nor -crf are set, the encoder will use a low default bitrate and your result will probably be poor. Always supply one of these options—ideally both. If this helps you at all, I created a casting script in linux that returns extremely nice quality. Granted I capture my screen and send this to a host, but you can modify it and also save as file. I guess one reason am showing you this is to show that default is not always best, should have more parameters and tell it exactly what you want as a result. #!bin/bash #settings can adjust #list of stream hosts SecureSaw="rtmp://flash.sawlive.tv:2139/flash/stream_key"; Saw="rtmp://publish.sawlive.tv/flash/stream_key"; JTV="rtmp://live.justin.tv/app/stream_key"; Ucaster="rtmp://ucaster.eu/live/username?key=stream_key"; Mips="rtmp://mips.tv/live/username?key=stream_key&id=id"; Ustream="rtmp://1.16711620.fme.ustream.tv/ustreamVideo/stream_key"; Zecast="rtmp://live.zecast.tv/zecast/username";#http://zecast.tv/channel.php?id=username Veemi="rtmp://live.veemi.com/live?u=username&p=stream_key/username";#http://www.veemi.com/watch?v=username Cast7="rtmp://xxx.cast7.eu/onlive?key=stream_key/username";#http://cast7.eu/index/stream/name/username&sid=id #select which stream host to use StreamHost="$SecureSaw"; #video capture in and out #keep in 8px increments or makes encoder do lots of extra work VideoInWidth="1024" VideoInHeight="768" VideoOutWidth="1024" VideoOutHeight="768" WidthOffset="0" HeightOffset="0" #video cropping CropTotalWidth="1024" CropTotalHeight="576" WidthCrop="0" HeightCrop="104" VideoFramesPerSecond="30" #suggest 24-30 VideoQuality="10" # suggest 10-30 , range is 0-68 , lower number is better quality KeyFrames="2" #suggest 1-2 NumberAudioChannels="2" #suggest 2 stereo , 1 mono NumberCPUcores="4" #count your logical cores VideoBitrate="450k" #try 500k ,varies your upload speed and quality of video/audio sending AudioBitrate="96k" #suggest 64,96,128 #STOP RIGHT THERE!!! #you should not change anything below unless know what they all do VideoInResolution="$VideoInWidth"x"$VideoInHeight" VideoOutResolution="$VideoOutWidth"x"$VideoOutHeight" avconv \ -f x11grab -y -s "$VideoInResolution" -g "$KeyFrames" -r:v "$VideoFramesPerSecond" -i :"$WidthOffset"."$HeightOffset" \ -f alsa -ac "$NumberAudioChannels" -i pulse -vol 1024 \ -c:a libmp3lame -ar 44100 -threads "$NumberCPUcores" \ -b:a "$AudioBitrate" \ -c:v libx264 -pix_fmt yuv420p -vsync 1 -crf "$VideoQuality" -s "$VideoOutResolution" \ -vf crop="$CropTotalWidth":"$CropTotalHeight":"$WidthCrop":"$HeightCrop" \ -b:v "$VideoBitrate" -minrate "$VideoBitrate" -maxrate "$VideoBitrate" -bufsize "$VideoBitrate" \ -y -f flv "$StreamHost" \
-
To get help here is best to paste your code. In this case maybe even your tumbler address.
-
On line 39 you have this: <form action="editor.php" method="post"></form> You basically ended the form without inserting anything into it. edit line 39 like this: <form action="editor.php" method="post"> and on line 51 add </form>: <input type="submit" value="Search" name="search" id="search"> </form>
-
What you have there is more like a select this and that....it shows results. Do you want information on how to do a normal search? using LIKE ? Personally i like using fulltext search as it simplifies multiple keyword searches. https://dev.mysql.com/doc/refman/5.7/en/fulltext-boolean.html
-
A lot of coding competitions you are actually doing work for clients...not guaranteed a pay, sometimes they do more positions for winners, not always.
-
forgot a double quote this line if (is_writeable("showpic.txt")) {
- 1 reply
-
- web page
- uploading pictures
-
(and 1 more)
Tagged with: