Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
90% Quality Score
Upvotes Received
13
Posts with Upvotes
12
Upvoting Members
12
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
1
6 Commented Posts
~40.5K People Reached
About Me

Avid enthusiast of CakePHP, hopelessly addicted code junkie, legend in my own mind

Favorite Tags

128 Posted Topics

Member Avatar for CFROG

I'm using Ubuntu server 12.04 LTS, nginx, PHP5, PHP5-fpm Recently I upgraded my PHP from v 5.3 to what I thought would be 5.4 but the package I used was further along than I thought and I ended up with v 5.5. It upgraded with no issues but I really …

Member Avatar for matrixdevuk
0
416
Member Avatar for Gearspro

Been a while since I used Vbulletin but this may help. Go to: >Vbulletin Options >User Registration Options Untick the "Verify Email address in Registration"

Member Avatar for I.M.O.G.
0
306
Member Avatar for CFROG

I'm receiving an 'undefined index' error when calling a new window and I can't quite figure out why. Seems to me like the variable is not being passed, or holds no value, and again I can't figure out why. I use an identical code for 'state' with no issues. Here …

Member Avatar for mwita
0
142
Member Avatar for CFROG

Does anyone feel that Cake is worth the trouble it takes getting used to it? I don't mind putting the time into learning it as long as it pays off in the end. They claim you are up and running faster and spend less time re-inventing the wheel and while …

Member Avatar for johnbo100
0
129
Member Avatar for wayz1229

A simple query would easily accomplish that, or am I not following what you are looking to do? [code] $fruits=mysql_query("SELECT atitle FROM table2 WHERE qid='1' "); while($row=mysql_fetch_array($fruits)){ $fruit_type=$row['atitle']; echo ''.$fruit_type.'' ; } [/code] That would output a list of fruits from your table. You can do the same for vehicles.

Member Avatar for kitschkath
0
115
Member Avatar for redmaverick

What is the situation where you wouldn't want some sort of user input? Java/Ajax could do something like that but that's not really my dept. I wouldn't be much help there.

Member Avatar for deepakrajpal
0
2K
Member Avatar for CFROG

I'm trying to output the results of an array to a table. To be more specific, I'm trying to output pictures ... let's say 5 pics per row for example. Below each pic I'd like to display a few options like delete, etc. I'm not looking for the answer, just …

Member Avatar for ijn1
0
284
Member Avatar for Tenaciousmug

Just throw the username into a variable and escape it that way. [code] $username = mysql_real_escape_string($_POST['fusername']); $cxn = mysqli_connect($host,$user,$password,$database) or die("Query died: connect"); $sql = "SELECT username FROM Member WHERE username='$username'"; $result = mysqli_query($cxn,$sql) or die("Query died: fusername"); $num = mysqli_num_rows($result); [/code] There are some functions to help with preventing …

Member Avatar for Mogradjinn
0
3K
Member Avatar for dan_t

Use your where clause to filter out the data. [code] $gender = $_SESSION['gender']; // or how ever you are accessing the gender data $query ="SELECT id FROM databasetable where gender <> '$gender' "; // Will select id's of the opposite sex [/code]

Member Avatar for rajarajan2017
0
112
Member Avatar for jatpatel1

There may be a better solution to this but a really quick way to get around it (I think) would be to nest one loop inside of the other (wouldn't be my first choice). [code] <?php $sql_list = mysql_query("SELECT DISTINCT BCountry FROM tblblogs"); while($row_list=mysql_fetch_array($sql_list)){ echo $row_list['BCountry']; $get_town = mysql_query("SELECT DISTINCT …

Member Avatar for kingredyard
1
234
Member Avatar for wish02

If you are dealing with a single record, ticket #, link, etc. [code] <a href="http://mysite.com/view_ticket.php?id=<?php echo $row['_ticketNum']; ?>">Click Here</a> [/code] On the next page (view_ticket.php) [code] $ticket_id = $_GET['id']; [/code] If your are dealing with multiple ticket #'s and hyperlinks at the same time the process would be the same …

Member Avatar for ayesha789
0
115
Member Avatar for wish02

You have onChange set up to submit the form when Category changes, what is it that you were expecting it do?

Member Avatar for wish02
0
281
Member Avatar for CFROG

I'm toying around with a script to allow users to search for other users based on certain criteria contained in their profiles. Anyhow, some of the attributes on the user profiles are things like what they are seeking like dating, someone to talk to, etc. I decided to serialize the …

Member Avatar for CFROG
0
93
Member Avatar for CFROG

I'm toying around with a script to allow users to search for other users based on certain criteria contained in their profiles. Anyhow, some of the attributes on the user profiles are things like what they are seeking like dating, someone to talk to, etc. I decided to serialize the …

Member Avatar for CFROG
0
67
Member Avatar for CFROG

All arguments aside from using $html->tag() instead of <tag> ... I'm a trying to create a table to display photos I'm pulling from the database and something is amiss. When I was testing this I changed $num_cols to 2 and it ended the row and started a new one after …

Member Avatar for CFROG
0
103
Member Avatar for muralibobby2015

Your setup will either echo "hello" or echo "world", but the way it's set up it will never output "hello world." So what was the question?

Member Avatar for mrnutty
0
86
Member Avatar for niths
Member Avatar for QWaz

I think this is what you are looking for: [CODE] for($i = 1; $i <= $round; $i++;) { /*** connect to db ***/ $conn = dbConnect('admin'); /*** set the error mode ***/ $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "INSERT INTO round (id, team, round, time, result) VALUES (?,?,?,?,?)"; /*** our sql query …

Member Avatar for QWaz
0
116
Member Avatar for Darkicon

This should work for you. [CODE]if($row->played_time >= 60){ $time = round($row->played_time,2) / 60 .' mins';} elseif($row->played_time >= 3600){ $time = round($row->played_time,2) / 60 / 60 .' hours';} elseif($row->played_time >= 86400){ $time = round($row->played_time,2) / 60 / 60 / 24 .' days';} else{ $time = round($row->played_time,2) .' secs'; }[/CODE]

Member Avatar for rajarajan2017
0
145
Member Avatar for danielagaba

The value and names of your radio buttons are going to be numbers, not names (or text). [CODE] //This will not do anything for you: if(isset($_POST['ed']))[/CODE]

Member Avatar for CFROG
0
134
Member Avatar for phpDave

Your query doesn't look quite right to me. Here is the syntax for using an inner join. [code] SELECT column_name(s) FROM table_name1 INNER JOIN table_name2 ON table_name1.column_name=table_name2.column_name [/code]

Member Avatar for phpDave
0
193
Member Avatar for QWaz

I seems like you might have your error reporting set to show E_NOTICE level errors. When error reporting is set to this level it will pester you about trying to use unassigned values amongst other things. If this is the case changing your error reporting level would correct this. [code] …

Member Avatar for QWaz
0
946
Member Avatar for jamesbarnhill

Have a closer look at your use of quotes. Try this: [code] foreach($rows as $row) { $result .= '<li><a href="javascript:void(0)" onclick="javascript:chatWith('.$row->username.')">' .htmlspecialchars(getNameFormatOnline($row->name,$row->username,$ueConfig['name_format'])).'</a></li>\n'; } [/code]

Member Avatar for CFROG
0
149
Member Avatar for computerfox
Member Avatar for CFROG
0
63
Member Avatar for leeZA1

It sounds to me like your are storing your passwords as plain text. If this is the case it's always a very bad idea to store your passwords this way. Hashing your passwords before you save them to the database will keep curious admins or mods from being able to …

Member Avatar for leeZA1
0
79
Member Avatar for bjeffries

My two cents would be that the errors are coming from the way the single and double quotes are structured. Some are missing and others need to be escaped. Perhaps it should look something like this: photo.php [code] .'<a href="viewAlbum.php?aid=$row['aid']">'; .'<img src="$row['filepath'].$row['filename']" border="0"/>'; .'</a><br/><span class="thumbText">'; .'<a href="viewAlbum.php?aid=$row['aid']">$row['stitle']</a><br/>'; ."$row['photog']</span></div>"; } mysql_close($con); …

Member Avatar for bjeffries
0
347
Member Avatar for mrcniceguy
Member Avatar for mrcniceguy
0
375
Member Avatar for mrcniceguy

What do you mean when you say it is giving you infinite results? It is not limiting your result set to 2 ?

Member Avatar for mrcniceguy
0
114
Member Avatar for PHPclown

I'm not quite sure I understand what you mean by [quote]how to make a browser game map [/quote]. I've spent a lot of time in the past working with the Google Map API and it's capable of some really cool things if you take the time to work through it …

Member Avatar for diafol
0
155
Member Avatar for IAuchmoody27

Make sure that this is the correct path to the application.php file and that the file actually exists in that location. [icode]../../GrBx/cw3/admin/application.php[/icode] <--------- It's looking for the the application.php file and it's not finding it. Some common reasons for this error are the filename is misspelled, the path to file …

Member Avatar for Cartweaver
0
408
Member Avatar for Nadoosh

Not too sure what type of "Calculation" you are looking to do but in any case it's not difficult. [code] <form method="post" action="some_page.php"> // assign a page the form will submit to, it can the same page or a different one. <input TYPE="checkbox" NAME="Saturday" VALUE="1" > <input TYPE="checkbox" NAME="Monday" VALUE="2" …

Member Avatar for Nadoosh
0
100
Member Avatar for mcastu

It doesn't look like you are executing your query. Tacking an [icode]or die(mysql_error());[/icode] on the end of the query will give you an immediate heads up if there is an error in your query. There are a few other possibilities why it's not working but I would start here. Try …

Member Avatar for mcastu
0
95
Member Avatar for cass84

For my html mail the only thing I did was alter my headers and there was really no problem. It's not that much different from what you already have. I suppose this is something I could stand to learn a little more about ... once I got it working I …

Member Avatar for muralibobby2015
0
344
Member Avatar for IAuchmoody27

Your pulling this [icode] $row_rsCWResults["product_ShortDescription"] [/icode] from a separate page in your script. The best option for what you have going on is to query the db again to pull that value for the page where it's needed. A generic query would look something like this ... you can fill …

Member Avatar for CFROG
0
104
Member Avatar for solarb

You're a bit confused with how $_GET works. On your content.php page if you want to pull the 'id's from the db and use them in a hyperlink it would be done like so: [CODE] $query=mysql_query("SELECT id FROM table_name WHERE id <> '' "); while($row=mysql_fetch_array($query)){ $id=$row['id']; echo '<a href="content.php?id='.$id.'">Some Text</a>'; …

Member Avatar for solarb
0
109
Member Avatar for CFROG

I've noticed a lot of posts lately with "how do I do this?" and "how do I do that?" You've somehow managed to end up with an entire db full of data and not the slightest clue what to do with it or how to use it. Rome wasn't built …

Member Avatar for vsmash
0
104
Member Avatar for fuggles
Member Avatar for CFROG
0
116
Member Avatar for ronaldpaul

[code] session_start(); // INSERT query here $_SESSION['last_insert'] = mysql_insert_id($link); [/code] That should give you the gist of it.

Member Avatar for CFROG
0
160
Member Avatar for ronaldpaul

It's not hard to figure out ... all you have to do is TRY. [url]http://www.w3schools.com/PHP/php_file_upload.asp[/url]

Member Avatar for CFROG
0
96
Member Avatar for whiteyoh

The first thing that comes to mind is that [icode] $_POST['register'][/icode] is not set. Have you tried anything to verify a value is being posted? ie. [code] if(isset($_POST['register'])) { echo 'IS SET'; die; } else { echo 'IS NOT SET'; die; } [/code]

Member Avatar for CFROG
0
86
Member Avatar for dan_ord

I'm with Ardav on using a framework for your JS / Ajax requests. It does pay to write out your scripts the long way in the beginning when you are learning just to get a feel for what the script is doing but you can literally turn this: [code] function …

Member Avatar for dan_ord
0
2K
Member Avatar for wiz83
Member Avatar for Morty222
Member Avatar for CFROG
0
71
Member Avatar for kiranbvsn
Member Avatar for diafol
0
458
Member Avatar for cane23

You have a syntax issue .... Try this and notice the changes I made: [code] echo"<tr><td>$row[0]</td><td>$row[1]</td><td><a href='myform.php?mode=edit&coursecode=$row[0]'>edit</a></td</tr>"; [/code]

Member Avatar for CFROG
0
260
Member Avatar for benk1

I think I can see what you are trying to do but just to be sure, why are you defining your $_SESSION variables again at the bottom of the page? Try dropping the $_GET and $_SESSION variables at the bottom of the page and rewrite the top where you initially …

Member Avatar for benk1
0
84
Member Avatar for sai.sriparasa

[quote]whenever I use a submit button only the selected value in the select box is posted[/quote] That's kinda' the way it works. Why would you want to post ALL values in the list ?? You already know the values the list contains so there is no need to post them …

Member Avatar for Wraithmanilian
0
135
Member Avatar for CFROG

[code] if( $_SESSION['user_id'] <> 1) { $ref = $_SERVER['HTTP_REFERER']; header( 'refresh: 5; url='.$ref); echo $_SESSION['user_id']; // <----- echoes '1' echo "<h2>Some feature is currently unavailable.</h2>You will be redirected to $ref in 5 seconds"; die; } [/code] I've written this a hundred different ways and it still redirects even though the …

Member Avatar for CFROG
0
99
Member Avatar for thomasd7

If you are using a cookie just to identify a user why not use [icode]$_SESSION[/icode] to hold the user id ?

Member Avatar for CFROG
0
87
Member Avatar for CFROG

I'm working with Google API trying to plot multiple points on a map. I can't find really good documentation on how I need to do this so I'm sort of winging it at this point. Obviously what I have is not working. The map is displaying and centered where I …

0
66

The End.