Returning "Resource Id #3"

Returning "Resource Id #3"

resultID should be returning their dancer number. It instead is returning "Resource Id #3"... What am I doing wrong? if($submit) { $db = mysql_connect("*****", "*****","*****"); mysql_select_db("*******",$
AVG() Function Always Returning "Array"

AVG() Function Always Returning "Array"

This is what I got, UPDATED $avg_query = "SELECT AVG(rating) AS avg_rating FROM kicks WHERE userid = '$userid'"; $avg_result = mysqli_query($cxn, $avg_query) or die("Couldn't execute query."); $row = mysqli_fetch_assoc($avg_result); $a
Equivelent Of Char.IsLetterOrDigit()?

Equivelent Of Char.IsLetterOrDigit()?

What's the equivelent of char.IsLetterOrDigit() in php 5?
Web Development -short-circuit OR That Returns The Left-most Value?

Web Development -short-circuit OR That Returns The Left-most Value?

In some languages, you can do $a = $b OR $c OR die("no value"); That is, the OR will short-circuit, only evaluating values from left to right until it finds a true value. But in addition, it returns the actual value that was evaluated, as oppose
Finding A Variable Within A Variable

Finding A Variable Within A Variable

Is there a way to find a variable within a variable between two spots? Not exactly KNOWN spots... but imbetween two chars like: Code: $variable = "this is junk<but anything here is good>but this is junk again, but i'll need this later..."
Address Without Spaces

Address Without Spaces

Is there code to remove spaces in results. <a href="http://maps.google.com/maps?oi=map&q='.$row["dbuscity"].'+'.$row["dbusstate"].'">'.$row["dbuscity"].', '.$row["dbusstate"].'</a>
Problem Is The Format That The Mail Goes Through.

Problem Is The Format That The Mail Goes Through.

Basically my problem is the format that the mail goes through. There is section in the middle of my confirmation e-mail that doesn't format correct. All fields should list underneath each other, but this is what it comes through as: Code:
Url Parsing - Turning Spaces To Pluses?

Url Parsing - Turning Spaces To Pluses?

Is there a php function for doing something like this:turning this-701 First Ave, Sunnyvale, CA to this-701+First+Ave,+Sunnyvale,+CA.
"" Does Not Break The Line In Notepad

"" Does Not Break The Line In Notepad

I write to a text file, and when view the resulting file in Notepad, it shows " " as tabs correctly, but " " does not break the line. Instad it shows as a square.
Date To Time Ago Without Using Strtime?

Date To Time Ago Without Using Strtime?

ok i have a date date('Y-m-d H:i:s'); how can we make it like 0 seconds ago or x year x month x day x minutes x seconds ago ? but without useing the str_time ( php 5.3.3 ) edit* i mean is some.date - time.now = someyear some month someday someminutes
Change Last Key Name From Array?

Change Last Key Name From Array?

i want to be able to change the last key from array. i try with this function i made: function getlastimage($newkey){ $arr = $_SESSION['files']; $oldkey = array_pop(array_keys($arr)); $arr[$newkey] = $arr[$oldkey]; unset($arr[$oldkey]); code.... if i
Change Array Key To Value?

Change Array Key To Value?

i want to change an array's key to its values. the array is like this: <php Array ( [0] => category_name: [1] => c1 [2] => types: [3] => t1 ) ?> code.... i want to make the same array's values as key, like below using some array function
One Value In My Array Won't Change

One Value In My Array Won't Change

For some reason every $shortName changes just fine except for SD... is there any logical explanation for this? ------------- $shortNames = array('NO', 'TEN', 'CHI', 'DAL', 'WAS', 'NYG', 'ATL', 'CAR', 'SEA', 'CIN', 'DEN', 'JAC', 'OAK', 'CLE', 'KC', 'M
"recent History" Work On Sites?

"recent History" Work On Sites?

I'm not sure if there is an explanation on SO for beginners, but if so, could you provide the links. I am interested in creating a "recent viewed" function that shows what links they clicked on before. I'm not sure if this is the 'correct' way t
Website With Postings

Website With Postings

I have not so much time to finish it. I want to be abble to users to post comments on a secondary web page. While on the main page I would post pictures and text. Something very simple but nice and easy to use. I know basic php ,mySql programing as w
Variable From Function

Variable From Function

I have this in a function $result1 = $db->sql_query("select id, team, pts from ".$prefix."_huntteam ORDER BY team"); echo "<form method="post" action="admin.php">" ; echo "<center><b
Variable From One Function

Variable From One Function

PHP Code: function form_error($error) { if (!isset($error_count)) { global $error_count; $error_count = 1; } if ($error_count == 1) { echo "<strong>Error:</strong><br />"; } echo $error_count.': '.$error."<br /><b
Function Through Variable

Function Through Variable

PHP Code: function output1() { echo "Today is ".date('Y-m-d'); } function output2() { echo "Time is ".date('H:i:s'); i know how to call the function through variable: "output".$_GET['id']; //i had try this.
Forms - Post Combination Of Formdata And Non-formdata?

Forms - Post Combination Of Formdata And Non-formdata?

I have a form I am creating and I would like to send information, not just from the form itself (easy enough to do with $_POST), but also generated information that corresponds to form data but is not visible to the user.I could create a hidden input
What Should I Use To Set Up Modified "Calendar" Form?

What Should I Use To Set Up Modified "Calendar" Form?

I have events that take place every Monday, Wednesday, Saturday, and Sunday, and I want to generate my copy--which is the same for most events--and my printed schedule from a php form. My plan is to first generate a form that lists pulldown boxes for
« Prev 1 2 3 4 5 6 ... 10 Next »