Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
1
0 Endorsements
~29.4K People Reached
Favorite Tags

107 Posted Topics

Member Avatar for MDanz

I just installed wamp, so i can test my website offline. Now i get numerous Undefined index or Undefined variable errors, which i know how to fix. Now logging in works online but with wamp it doesn't work. The code isn't wrong. I imported the database online to offline. I've …

Member Avatar for ryantroop
0
93
Member Avatar for MDanz

I've looked everywhere and haven't found a clear step by step tutorial on how to secure sessions/cookies. Here are snippets of my code, i'd like to know how i can improve on session security to prevent fixation/hijacking and cookie safety. This is snippets of code for the user login system. …

Member Avatar for pritaeas
0
301
Member Avatar for MDanz

I'm trying to do a query that if mike isn't in the three highest bids for a keyword, then select the row(row that has been outbid). I tried below but i get no results, i should get rows with id 4 and 7. btw a keyword can be bidded on …

Member Avatar for |-|x
0
126
Member Avatar for MDanz

Each childrow has a parentid and position. For childrows with the same position there is one row where start='1'. What i'm trying to do is return the pending rows with their start row. The results that should be shown are; start(owen) pending(dave,paul). This is because they have the same position. …

Member Avatar for rch1231
0
126
Member Avatar for MDanz

i'm trying this below but it isn't working, the page is coming up blank .. [CODE]<?php $url = 'http://www.realgm.com'; function get_url_contents($url){ $crl = curl_init(); $timeout = 5; curl_setopt ($crl, CURLOPT_URL,$url); curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout); $ret = curl_exec($crl); curl_close($crl); return $ret; } ?>[/CODE]

Member Avatar for RoseAug
0
293
Member Avatar for MDanz

The query below is correct. It returns the rows `paul` and `rick` because they have the highest rating of the child rows. This was solved for me with the below link. I am having trouble understanding the query. I understand joins, what i don't understand is `t2.rating is null`? [URL="http://sqlfiddle.com/#!2/97e60/2"]http://sqlfiddle.com/#!2/97e60/2[/URL] …

Member Avatar for smantscheff
0
203
Member Avatar for MDanz

Ok, as easiest as i can explain. - There are many child.sid to parent.id - There are many child.nid to child.sid - There are many child.id to child.nid child.id is just the id of a child row. And each row has rating column. In the query i'm grouping by child.nid. …

Member Avatar for Biiim
0
596
Member Avatar for MDanz

With the below query I'd get the results one and three. How do I get the results for `sid`; 15 and 17? I can't use a WHERE because I won't know the `sid`. A better way of explaining is, how do I LIMIT per `sid` without grouping? [CODE]mysql_query("SELECT * FROM …

Member Avatar for smantscheff
0
153
Member Avatar for MDanz

i've done this [code]RewriteRule ^([A-Za-z0-9-]+)/?$ profile.php?user=$1 [L][/code] to make [code]www.example.com/profile.php?user=testing[/code] into [code]www.example.com/testing[/code] What i'd like to do is change.. [code]www.example.com/profile.php?user=testing[/code] into [code]www.example.com/user=testing[/code] What is the RewriteRule to accomplish this? Also if i used $_GET['user'] with the second clean url would it still work?

Member Avatar for hijabihtohai
0
141
Member Avatar for MDanz

I have a large array. Is there an alternate method to check if $value in the array is present in the MySql table vote and if not then insert $value into vote. This is what i am doing currently. Is there a better method? [CODE]foreach($rowids as $value) { $select = …

Member Avatar for smantscheff
0
87
Member Avatar for MDanz

where did i go wrong? It should update mysql(insertsubscribe function) and change the image in the anchor tag. php [code] $id= $row['id']; echo "<div class='subscribe'><a id='s$id' href='javascript:subscribe($id);'><img src='/subscribe.jpg' alt='subscribe' /></a></div>";[/code] ajax [code]function subscribe(number) { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code …

0
71
Member Avatar for MDanz

Can i get help correcting the code below? You can just copy and paste and try it yourself. Onmouseover the popup div appears. If i click(X) the popup div should close but it doesn't. Only doubleclicking (X) closes the popup div. Onmouseover it should always display a popup div though. …

0
75
Member Avatar for MDanz

This is a function for a slideshow,onmouseover i want it to stop. Instead of stopping the slideshow onmouseover, it speeds up?? How can i correct this to stop onmouseover? [CODE]<body onload="nextslide();">[/CODE] [CODE]function nextslide() { // Hide current slide var object = document.getElementById('slide' + current); //e.g. slide1 object.style.display = 'none'; // …

Member Avatar for Airshow
0
140
Member Avatar for MDanz

i tried this code but onmouseover it doesn't stop the the slideshow? [code] function nextslide() { // Hide current slide object = document.getElementById('slide' + current); //e.g. slide1 object.style.display = 'none'; // Show next slide, if last, loop back to front if (current == last) { current = 1; } else …

0
70
Member Avatar for MDanz

The width spreads across the whole page, i only want it to be as long as the content in the div. How can i solve this? [code]<style type="text/css"> .three { display:block; width:auto; height:100px; position:relative; border:1px solid black; } .three a { width:100%; height:100%; position:absolute; } </style>[/code] [code]echo "<div class='three'><a href='two'></a>test</div>";[/code]

Member Avatar for Arkinder
0
107
Member Avatar for MDanz

[CODE]RewriteRule ^user/[A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ /profile.php?user=$1&r=$2&page=$3 [L][/CODE] this isn't working... i get an internal server error.. if i remove it the page works. Any idea how to fix this? the url should be like below [url]http://www.example.com/user/testing/1/1[/url]

0
84
Member Avatar for MDanz

I've recently used mod_rewrite and changed my .htaccess allowing clean urls. Is there a tutorial that tells me how to use $_GET with a clean url? for instance how do i get the name with the clean url($_GET method)? messy url[code]example.com/play.php?id=203&name=test[/code] clean url[code]example.com/videos/play/203/test[/code] also when using forms is it as …

Member Avatar for diafol
0
105
Member Avatar for MDanz

i'm not getting any results for the query. I'm sure it has something to do with the apostrophe and back slashes [code] $search = "q test'yes"; $search = mysql_real_escape_string($search); mysql_query("SELECT * FROM block WHERE name LIKE '%$search%' ORDER BY `id` DESC",$this->connect); [/code] When i echo it out i get this …

Member Avatar for urtrivedi
0
2K
Member Avatar for MDanz

i'm trying to get a clean url for my about page. i want to change [url]http://www.example.com/about.php[/url] to [url]http://www.example.com/about[/url] i put my htaccess file as this [code]RewriteEngine On RewriteBase / RewriteRule ^(.+)/([0-9]+)/?$ about.php[/code] it's not working though, i get the 404 not found error.

Member Avatar for MooGeek
0
77
Member Avatar for MDanz

Onchange of the dropdown list, the textfield should display either "testing 3" or "testing 4" but nothing is happening. [code] <form action='submit.php' method='POST' name='form'> <select name='preset' onchange='preset(this);'> <option value='test1'>testing 1</option> <option value=test2'>testing 2</option> </select> <input type='text' name='big[]' value='' /> </form> [/code] [code] function preset(ele) { if(ele=="test1") { var action1 = …

Member Avatar for karthik_ppts
0
89
Member Avatar for MDanz

I get random Parse error: syntax error, unexpected $end in my code. All i have to do is refresh the page and the error goes away, all is working. When it appears the line is always different and when i examine the line nothing is wrong with the code. This …

Member Avatar for almostbob
0
203
Member Avatar for MDanz

Hello, what do professional web designers do to overcome this problem? Is there a simple solution for png transparency support in ie6? I found a fix but i don't want to buy any license to use some code.

Member Avatar for pixelsoul
0
68
Member Avatar for MDanz

My png image with no background works in firefox, chrome etc.. but when it comes to ie6,ie7 i have to use the alphaimageloader filter. What is the common way professionals approach this problem? Websites like twitter the images with no background overlap with no problems when i load them in …

Member Avatar for sagive
0
79
Member Avatar for MDanz

what i'm trying to do is get the contents of the textarea, which the id is 'reply'. then onclick of a button, a popup div with id 'layer1' displays the contents of the textarea. i tried below but it comes up blank. i haven't included the pop up/button code, thats …

Member Avatar for jusvin85
0
4K
Member Avatar for MDanz

This code adds a new textarea when i press the "add" button. How do i alter the code so it can remove a textarea. e.g. i added 4 textarea's but i only intended to add 3, how do i delete the 4th textarea? [CODE]<div id='newdiv'> </div>[/CODE] [CODE]<input type='button' onclick='new()' name='add' …

Member Avatar for PsychicTide
0
104
Member Avatar for MDanz

for example.. in one column it has "test1, test2, test3, test4" .... when i search for test1... i only want rows the word 'test1' in them specifically. $search = test1 i've tried LIKE %$search% but it get's all rows with the word 'test' in it... i want only rows with …

Member Avatar for davidchilders
0
115
Member Avatar for MDanz

i have a form on submit.php, with method post to the same page($PHP_SELF). If i made a mistake i want to be able to press 'Go Back' to the previous page(same page) and have the values in their textfields. [code] if(isset($_POST['new'])) { <a href='#' onClick='history.go(-1)'>Go Back</a> } else { // …

Member Avatar for Airshow
0
139
Member Avatar for MDanz

i want box 1 and box 2 horizontally next to each other. I want the parent div if the content overflows to scroll and box1 and box2 horizontally next to each other. i tried below but box2 keeps going underneath box1. the scroll is necessary. [code]<div id='parent'> <div id='box1'></div> <div …

Member Avatar for scottloway
0
8K
Member Avatar for MDanz

the function keeps returning 1. if i echo $i within the function then it counts up to six. the function should return 6, because there are 6 results from the mysql_query, so $i iterates upto 6. please any help solving this? [CODE] $i=0; $thewidth = $database->width($theid, $i); echo $thewidth; [/CODE] …

Member Avatar for kekkaishi
0
81
Member Avatar for MDanz

i have two functions. In function two it has $id=9. how do i get function one to echo $id? how do i adjust the below example to accomplish this? [code] $newdb = new Database(); class Database { function one() { $newdb->two(); echo $id; } function two() { $id = 9 …

Member Avatar for jkon
0
76
Member Avatar for MDanz

i've been doing while loops for this problem .. i dont think its the right way though. i have a set of boxes each with a boxid(apart from the first), which is the id(mysql) of the previous box. [quote]e.g. box 1 has id 1 box 2 has id 2 and …

Member Avatar for diafol
0
108
Member Avatar for MDanz

the following should return 1 row [code] $search= "Timothy"; $query4 = mysql_query("SELECT * FROM test1, test2, combination WHERE test1.IDONE = `combination`.IDONE AND test2.IDTWO = combination.IDTWO AND test1.NAME LIKE '%$search%'",$this->connect) or die(mysql_error()); [/code] instead it returns zero. the query should take values from all three tables according to the where clause. …

Member Avatar for griswolf
0
136
Member Avatar for MDanz

I want to loop the below code until $grade=80, is the code below correct [code]<?php include "grade.php"; $getgrade = new Grade(); // create an instance of the class(Grade) echo "<ul id='navigation'>"; for($grade=0;$grade<80;$grade+10){ $max = $grade+9; echo "<li><a href='#'>$grade-$max%</a> <ul><li>"; $getgrade->results($grade+9); echo "</li></ul> </li>"; } echo "</ul>"; ?>[/code] the page isn't …

Member Avatar for pritaeas
0
57
Member Avatar for MDanz

when i put this in phpmyadmin i get errors... can anyone look over it and find a mistake.. [code]CREATE TABLE Student { SID int NOT NULL default, SNAME varchar(200) NOT NULL default, ADDRESS text NOT NULL default, POST_CODE varchar(10) NOT NULL default, PHOTO mediumblob NOT NULL default, Primary Key (SID) …

Member Avatar for pritaeas
0
135
Member Avatar for MDanz

[code]foreach ($items as $product ) { echo $product; ?><input type="text" size="2" value="<?php \\display quantity here ?>" name="quantity" /><?php }[/code] $items is an array. It has multiple values, some duplicate. How do i count the duplicate values in the array and display in this foreach loop? i know array_count_values($product) but putting …

Member Avatar for cwarn23
0
270
Member Avatar for MDanz

i'm having trouble getting this to work. i want mysql to delete a row where the word 'example' is within a paragraph of a column. e.g. in the column reply.. it has a paragraph with the word 'example' in it. [code]$deletebadreply1= mysql_query("DELETE FROM `Reply` WHERE `reply` LIKE '%example%'") or die …

Member Avatar for AndreRet
0
149
Member Avatar for MDanz

The font size is 28px. How do i change the font size to 12px onfocus? i tried below but it isn't working. [code] <textarea name='content' style='font-size:28px;' id='content' onfocus='font-size:12px;'>test</textarea>[/code]

Member Avatar for hielo
0
179
Member Avatar for MDanz

how do i limit this textfield to three words? [code]<input type='text' size='40' name='search' style='font-size:16px; font-family:Arial;font-weight:bold;' />[/code] i only want three words to be allowed entered.

Member Avatar for MeSampath
0
75
Member Avatar for MDanz

how do i run a query for a variable with multiple values? i've been told a loop is not the right way to do it, which is the way i've been doing it and it has worked. I assumed putting it in a foreach loop would accomplish looping the query …

Member Avatar for mwasif
0
159
Member Avatar for MDanz

I have to columns Positive and Negative. i use this as a rating system. e.g. For example if Positive is value 2 and Negative is value 1 and i subtract. Then the total would be 1. i have a variable $order. if i did $order="(Positive-Negative)"; I now that is incorrect. …

0
71
Member Avatar for MDanz

this has been driving me nuts. It should work. $value2 is an array with two strings in it. mysql_num_rows should return 1 row for each string. instead it returns zero. I simplified it below and cannot get it to work. it should echo "equals one". [CODE]$value2 = $_POST['topic']; foreach($value2 as …

Member Avatar for Kieran Y5
0
75
Member Avatar for MDanz

the problem is mysql_num_rows is returning zero rows.. when it should return 1 row. the variable $value is an array with two strings (testa and testb)... when i remove the foreach loop and replace $key with 'testa' in the query it works(returns 1 row). how do i solve this?... both …

Member Avatar for FlashCreations
0
84
Member Avatar for MDanz

i have the textarea.. [code]<textarea name='content' id='content' wrap='soft' style='background-image: url(\"frontinput.jpg\");color: #000000;font-size:12px;font-family:Arial;width:445px; height:77px;border:none; padding:5px;'></textarea>[/code] when i display in the div.. the text doesn't fill up the div. the text goes 75% of the way and then line breaks. here is the css for the div. [code].message { float:left; width:98%; background-color:#EFEFEF; border: …

Member Avatar for teedoff
0
92
Member Avatar for MDanz

here's my code.. the divs aren't listing below one another. [code] <div id="headerfront">//phpcode</div> <div class="qclass"> //php code </div> <div id="amount" class="aclass"> //phpcode </div>[/code] [code] #headerfront { display:block; position:absolute; width:100%; top:0px; left:0px; height:115px; text-align:center; background-image:url("headerbackground.jpg"); } .qclass { display:block; width:1000px; margin:0 auto; } .aclass { display:block; margin:0 auto; } [/code] how …

Member Avatar for JoshJ47
0
293
Member Avatar for MDanz

i just started web developing and dived straight into table layouts. now that i've finished my project... i thought it would be easy to transition to divs. The problem i am having is positioning. Can i get help with these questions. [code]display:block; [/code] does display:block list divs one under another?... …

Member Avatar for macgurl70
0
149
Member Avatar for MDanz

when posting a new message on my forum and it contains a url. How do i automatically add the bbcode url tags to a url in the message?

Member Avatar for metalix
0
85
Member Avatar for MDanz

i have a form that i'd like to duplicate on the press of a button? [code] echo "<form enctype='multipart/form-data' action='rapidinsert.php' method='post' name='changer'> <br /><br /> <font color='#D99C29' face='Arial' size='3px'>Add Noun </font><input type='text' name='noun' value='' size='30' /> <input type='submit' value='Submit' style='font-size:10px' /> <input type='submit' value='Add form' style='font-size:10px' /> </form>";[/code] How do …

Member Avatar for Stefano Mtangoo
0
100
Member Avatar for MDanz

i have this in a loop and a form so the variable changes. i have the word printed next to the checkbox. On the page the form directs to, how do i get the $varibles that have been clicked on. [code]echo "<td align='left' width='110'>$topic<input type='checkbox' name='$topic' value='No' /> </td> </tr></table></td>";[/code]

Member Avatar for pritaeas
0
65
Member Avatar for MDanz

i pass this to a div innerhtml from javascript. when i do it like this it doesn't work. it should display an image hyperlink [code]var newtext4=("<a href=" + number + "><img src=" + newtext2 + " /></a>");[/code] if i do just text, it displays a hyperlink. [code]var newtext4=("<a href=" + …

Member Avatar for fxm
0
134
Member Avatar for MDanz

i want onchange of an option in the dropdown list to change the value of the textarea. I tried but it's not working. [code] <script type='text/javascript'> function ChgBox(number) { var thecontent = document.getElementById(number).innerHTML; document.getElementById(content).value = thecontent; } </script> [/code] [code] echo "<div style='display:none;' id='2'>Type Image Url</div>"; $thenum ="2"; <select> <option …

Member Avatar for Graphix
0
109

The End.