Hey ,
For Some reason i get an error
heres the code that works
my search
PHP
[code<?php
$Server="Blah";
$DBuser="Blah";
$DBpass="Blah";
$Database ="theojm_Clients";
$Table="user_auth";
$viewusername = stripslashes($_POST[$username]);
$DBconnect = mysql_connect($Server, $DBuser, $DBpass);
mysql_select_db($Database,$DBconnect);
$Result = mysql_query("SELECT username, password, name, password, email, location, websitetitle, websiteurl, personaltext, pic, ownpic, ownpiccheck FROM $Table WHERE username = '$username'");
if (!mysql_num_rows($Result))
die ("&Status=Error Reading Data.");
$Break = mysql_fetch_array($Result);
$name = $Break[name];
$password = $Break[password];
$email = $Break[email];
$location = $Break[location];
$websitetitle = $Break[websitetitle];
$websiteurl = $Break[websiteurl];
$personaltext = $Break[personaltext];
$pic = $Break[pic];
$ownpic = $Break[ownpic];
$ownpiccheck = $Break[ownpiccheck];
$Data = "&name=" . $name . "&password=" . $password . "&repassword=" . $password . "&email=" . $email . "&location=" . $location . "&websitetitle=" . $websitetitle . "&websiteurl=" . $websiteurl . "&personaltext=" . $personaltext . "&pic=" . $pic . "&ownpic=" . $ownpic . "&ownpiccheck=" . $ownpiccheck . "&Loaded=True";
echo ($Data);
?>[/code]
and all i did was I added more fields.. its the same script but more fields
Same PHP but More Fields
[code]<?php
$Server="Blah";
$DBuser="Blah";
$DBpass="Blah";
$Database ="theojm_Clients";
$Table="Registration";
$viewusername = stripslashes($_POST[$ownersname]);
$DBconnect = mysql_connect($Server, $DBuser, $DBpass);
mysql_select_db($Database,$DBconnect);
$Result = mysql_query("SELECT ownersname, address, city, state, zip, phonenum, cellnum, emergencynum, typeone, typetwo, typethree, petone, pettwo, petthree, breedone, breedtwo, breedthree, bornone, borntwo, bornthree, sexone, sextwo, sexthree, barkerone, barkertwo, barkerthree, codeone, codetwo, codethree, descriptions, instructions FROM $Table WHERE ownersname = '$ownersname'");
if (!mysql_num_rows($Result))
die ("&Status=Error Reading Data.");
$Break = mysql_fetch_array($Result);
$ownersname = $Break[ownersname];
$address = $Break[address];
$state = $Break[state];
$zip = $Break[zip];
$phonenum = $Break[phonenum];
$cellnum = $Break[cellnum];
$emergencynum = $Break[emergencynum];
$typeone = $Break[typeone];
$typetwo = $Break[typetwo];
$typethree = $Break[typethree];
$petone = $Break[petone];
$pettwo = $Break[pettwo];
$petthree = $Break[petthree];
$breedone = $Break[breedone];
$breedtwo = $Break[breedtwo];
$breedthree = $Break[breedthree];
$bornone = $Break[bornone];
$borntwo = $Break[borntwo];
$bornthree = $Break[bornthree];
$sexone = $Break[sexone];
$sextwo = $Break[sextwo];
$sexthree = $Break[sexthree];
$sizeone = $Break[sizeone];
$sizetwo = $Break[sizetwo];
$sizethree = $Break[sizethree];
$barkerone = $Break[barkerone];
$barkertwo = $Break[barkertwo];
$barkerthree = $Break[barkerthree];
$codeone = $Break[codeone];
$codetwo = $Break[codetwo];
$codethree = $Break[codethree];
$instructions = $Break[instructions];
$descriptions = $Break[descriptions];
$Data = "&ownersname=" . $ownersname . "&address=" . $address . "&city=" . $city . "&state=" . $state . "&zip=" . $zip . "&phonenum=" . $phonenum . "&cellnum=" . $cellnum . "&emergencynum=" . $emergencynum . "&typeone=" . $typeone . "&typetwo=" . $typetwo . "&typethree=" . $typethree ."&petone=" . $petone . "&pettwo=" . $pettwo . "&petthree=" . $petthree ."&breedone=" . $breedone . "&breedtwo=" . $breedtwo . "&breedthree=" . $breedthree ."&bornone=" . $bornone . "&borntwo=" . $borntwo . "&bornthree=" . $bornthree ."&sexone=" . $sexone . "&sextwo=" . $sextwo . "&sexthree=" . $sexthree ."&sizeone=" . $sizeone . "&sizetwo=" . $sizetwo . "&sizethree=" . $sizethree . "&barkerone=" . $barkerone . "&barkertwo=" . $barkertwo . "&barkerthree=" . $barkerthree ."&codeone=" . $codeone . "&codetwo=" . $codetwo . "&codethree=" . $codethree . "&descriptions=" . $descriptions . "&instructions=" . $instructions . "&Loaded=True";
echo ($Data);
?>code]
And This Is The error i get now
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /Clients/ViewEdit.php on line 14
What could i do?