-
Posts
3,404 -
Joined
-
Last visited
-
Days Won
55
Everything posted by Ch0cu3r
-
You are getting those errors because you are using it incorrectly. There is a difference between the mysql_* functions and the mysqli_* functions. Just adding i after mysql in the function name is not going to work. Study the mysqli documentation to learn how to use mysqli correctly.
-
If you use relative urls path in your HTML it will be added onto the current url. So if your url is https://example.com/page1/controller1 (no / at the end) it will attempt to load the image from https://example.com/page1/ if the url did end with a / then it attempt to load the image from https://example.com/page1/controller1/ Personally I always use absolute url paths in my HTML by starting them with a /. Ie /images/myimage.png will always load the image from http://site.com/images/myimage.png no matter what the current url is. As you normally would by adding by adding them after the ? in the url, eg https://example.com/page1/controller1?var=1&var2=foo. Note in order for these additional parameters to reach index.php you will need to apply the QSA (Query String Append) flag to your RewriteRule
-
Lines 7 through to 9 should be after this line if(isset($_POST['add'])) && (isset($_GET['id'])); {
-
You can connect to MySQL without declaring a database. If you attempt to query a table without selecting a database MySQL will report a database not selected error.
-
Error with login...Notice: Undefined index: salt
Ch0cu3r replied to alphasil's topic in PHP Coding Help
In order to compare the password hash correctly you need pass that function the original salt the password hash was generated with. Without the salt you cant compare the hashes! I would recommend you not salting the passwords yourself. Instead use PHP's password_hash function to hash the password then use password_verify to see if the user entered correct password. You will need to use ircmaxwell's password_compat library if you are not running PHP5.5 -
Barands code returns the 3 digits after local/ Are you now saying their could be more than 3 digits after Local/?
-
Topics merged. @Nyla do not create new topics for the same problem.
-
As I said earlier. The box shadow will wrap around the element you apply it to. You have used the box shadow in the #img selector. Therefore it will apply the box shadow to the div with the id of img. If you want the box shadow around the actual image then you'll need to target that element in your css, in which case you use #img img selector or just use the img selector to apply it to all images Also if you want to center elements dont use <center></centre>. You can apply auto margins for centering CSS body { background-image: url('http://desktopwallpapers.biz/wp-content/uploads/2014/09/Website-Background-Cool-HD.jpg'); } #img { background-color: #000; margin-top: 40px; } /* apply box-shadow to the <img> within <div id="img"> */ #img img { box-shadow: 5px 0px 5px 0px #ff0000; margin: 0 auto; /* use auto margins to center element */ display: block; } HTML <div id="img"><img src="pic.png" /></div>
-
The box shadow will only wrap around the element you are applying it to. If you have extra space around the image there is mostly like some margin/padding being applied to the image or the element the image is contained within? Its hard to tell you without seeing a working example of your problem.
-
What? You started of saying you dont want it to go around the image then you are asking how to go around the image. So which is it? Maybe google for "CSS box shadow generator" and play with them to get the effect you are after?
-
Could try SELECT c.name, COUNT( b.belegung ) AS bookings FROM customer c LEFT JOIN bookings AS b ON c.name = b.belegung GROUP BY c.name Results +-----------+----------+ | name | bookings | +-----------+----------+ | Customer1 | 3 | | Customer2 | 2 | | Customer3 | 1 | | Customer4 | 0 | | Customer5 | 0 | +-----------+----------+ Ideally you should have the id of the customer recorded in your bookings table and not their name.
-
Um... weird IE does not like the background color being applied to the table row along with opacity. I experimented by adding td after the tr:nth-child() selector and this seemed to fixed the opacity issue. . CSS body { background-image: url(DiveFlagBackground.jpg); } th { background-color: #00F; color:#FFF; font-size: large; font-weight: bolder; font-family: Georgia, "Times New Roman", Times, serif; } tr:nth-child(even) td {background-color: #6FF; } tr:nth-child(odd) td {background-color: #FFF;} tr {text-align: center; opacity: .8;} tr:hover td {background-color:#000; color:#00FF00}; I have only tested on IE11 (no idea about earlier versions)
-
PHP script is loading in plain text instead of processing
Ch0cu3r replied to ghurty's topic in PHP Coding Help
You are best of changing it to the full PHP tag <?php <? is only available if a config setting called short_open_tag is enabled in the php.ini. -
Yes both types of urls are possible. Try adding the following to your .htaccess RewriteEngine On RewriteRule index(\.php)?/(\d+)/(\d+)/? index.php?q=$2&w=$3 But you will need to edit your links in your php script to use the new url format. mod_rewrite does not alter the the links for you.
-
You have have not closed the opening table tag. There should be a > after cellspacing="2" Your HTML is not a complete document you have left of the DOCTYPE, <html>, <head></head> tags. Basic HTML structure should look like <!DOCTYPE html> <html> <head> <title>Title</title> ... link to styesheets / javascript / other external resourse here ... </head> <body> ... html for page here ... </body> </html> Try using filter. IE is not always known for treating CSS properties the same as other browsers. Make your selector be more specific tr:hover will affect any HTML element contained within the table row. However tr:hover td will only affect the <td> tags within the table row. Moving the body selector to the top should not affect anything. Just make sure you have not placed it within another selector! Or caused syntax error in your css elsewhere.
-
$row['dstchannel'] is the variable you want to check if (empty($row['dstchannel'])) { echo "No Data"; } else { echo $row['dstchannel']; } // or could be written as the following using a Ternary Operator echo empty($row['dstchannel']) ? 'No Data' : $row['dstchannel'];
-
How to move html text in php to another page
Ch0cu3r replied to samson132's topic in Third Party Scripts
Your could try commenting out lines 174 through to 176 (add // at the start of the lines eg) // if(isset($section['intro'])){ // $form[] = array('#markup' => $section['intro']); // } Now before line 147 add the following $form[] = array('#markup' => $wb_spc_array['sections'][0]['intro']); -
Make sure you have enable the MySQLi extension in PHP's configuration. I think with WAMP you can left click the tray icon > PHP > Extensions > php_mysqli to enable mysqli
-
Yes. Use empty to see if the column is empty then echo "No data" if it is.
-
@bsmiter Not true. Only variables are expanded within quotes
-
You'd need to use Javascript. When the Computer radio button is clicked show the file field. If the Web radio button is click show the textbox. Here is an example using Jquery: http://jsfiddle.net/d1n9xLwz/ NOTE: Only the file input field will upload the file to your server! The text field for entering the url to the file will only submit what was entered into it.
-
What do you mean by the term "from the internet"
-
What day is it? Buried dropdown list option problem
Ch0cu3r replied to YZFR1's topic in Third Party Scripts
Umm... It looks like the year is defined as an enum in your news table (Which is stupid IMO). Can you post the output of this printf('<pre>%s</pre>', print_r($keytype, 1)); Add it after these lines in datax.php while ($r= mysql_fetch_array($result)) { //create the ket type array $keytype[$r[Field]]=$r[Type]; } In actual fact all the code in datax.php is no good really. If that is the code to one file I would hazard a guess and deem the entire CMS will need to be re-coded. -
Testing printf EDIT. I guess this was fixed? Been using the manual bbcode in my posts yesterday and did not see this issue? echo echo
-
query select from table where price is < or >
Ch0cu3r replied to jamesreno20's topic in PHP Coding Help
First check to make sure the min and max inputs are numbers then place the variables inplace of 3 and 8 in your query. Preferably using a prepared query