Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
10
Posts with Upvotes
10
Upvoting Members
9
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
~69.4K People Reached
About Me

Someone who's learning as he goes along

Interests
Fingerstyle Guitar, Anime, Movies, Video Games
Favorite Tags

127 Posted Topics

Member Avatar for vijiglad
Member Avatar for phorce

hmm... to replace all white space and special characters you could do something like this [CODE] //removes everything except letters preg_replace( '~[^a-zA-Z]~', '', $str ); //removes white space only str_replace(' ', '', $str); //specfic characters like . and ! remember to escape it preg_replace( '~[\.!]~', '', $str ); [/CODE]

Member Avatar for phorce
0
129
Member Avatar for akhtar.ali803

I had a similar problem due to weird characters, make sure that every character in your password is correct.

Member Avatar for phorce
0
167
Member Avatar for Stefano Mtangoo
Member Avatar for sirlink99

by doing a google search [CODE] function getDocHeight() { var D = document; return Math.max( Math.max(D.body.scrollHeight, D.documentElement.scrollHeight), Math.max(D.body.offsetHeight, D.documentElement.offsetHeight), Math.max(D.body.clientHeight, D.documentElement.clientHeight) ); } console.log(getDocHeight()); [/CODE]

Member Avatar for qazplm114477
0
99
Member Avatar for anthonyjpv

Depending on your html form you use to update. If you have a drop down with all the category names and ids you could just do a simple insert. ex: [CODE] //assuming $_POST['category'] as the category ID $query = "INSERT INTO products (prodName, categoryID) VALUES ( '{$_POST['prodName']}', '{$_POST['category']}' )"; //else …

Member Avatar for anthonyjpv
0
193
Member Avatar for Hendo

[CODE] <html> <head> <link rel="stylesheet" type="text/css" href="fh.css" /> </head> <body> <?php if (isset($_POST['user']) && isset($_POST['pass'])) { $user=""; $pass=""; // this variable is anything you enter in the uname and password fields $user=$_POST['user']; $pass=$_POST['pass']; // authenticate if (($user=="Enter") && ($pass=="12345")) echo "Access Granted"; else die("Access Denied"); } ?> <form action='forms.php' method='post'> …

Member Avatar for EnjoyYourMeal
0
259
Member Avatar for bisibee82

I'm still a little bit unsure as to what exactly you want to do but I'll try to help. Are you passing the the ending time directly into the javascript function? You could just display all the timers first but hide it with css and have the javascript show the …

Member Avatar for diafol
0
487
Member Avatar for BilalAKhan

the problem lies with your query. You only have 3 fields specified but 4 values. it should be something like this [CODE] INSERT INTO blog (title, specialization, message, user) VALUES (%s, %s, %s, ".$_SESSION['MM_Username'].") [/CODE] I'm not sure what the field is for but replace user with what ever field …

Member Avatar for fobos
0
199
Member Avatar for missumissu

That just moves the uploaded files to the upload folder, it doesn't record anything to the database, at least not with the code you presented.

Member Avatar for qazplm114477
0
132
Member Avatar for jQueryLover

what is this part for? [CODE]var col = $(this).parent().children().index($(this));[/CODE] looks like you are trying to get the same td again which ultimately is $(this). [CODE] $('td').click(function(){ //$(this) would be the clicked td. }); [/CODE]

Member Avatar for jQueryLover
0
96
Member Avatar for swissknife007

[url]http://phpmaster.com/[/url] has alot of sweet articles [url]http://phpro.org/[/url] is where I learnt most of the advance stuff in PHP

Member Avatar for rotten69
0
413
Member Avatar for kdogg556

since ALL fields are required it would be best to validate it with javascript but still have PHP validate just in case the user has javascript turned off. The way you are validating right now is valid but don't forget to sanitize it. since ALL fields are required you could …

Member Avatar for qazplm114477
0
178
Member Avatar for qball_irl

try this query [CODE] $sqlGetLoginCode="SELECT lastLogin FROM usersLoginHistory WHERE userId=".mysql_insert_id()." ORDER BY id DESC LIMIT 1"; [/CODE]

Member Avatar for qball_irl
0
115
Member Avatar for BKoehler

either echo the url into an image tag or do a file_get_contents() on the image, send the correct headers to display an image and than echo it.

Member Avatar for qazplm114477
0
306
Member Avatar for stranger_on_way
Member Avatar for Buppy

protected values can only be accessed by the class or any class that extends. [CODE] class foo{ protected $value = 'test'; //only this class can call privates ^_^ private $val2 = 'hohoho'; public function getVal () { return $this->value; } } class bar extends foo{ public function getFooVal(){ return $this->value; …

Member Avatar for diafol
0
149
Member Avatar for dunktap

I'm guessing you are saving the image as a blob in the database and outputting it with image headers()? Personally I haven't done this before but here's my 2 cents. [CODE] $url= 'imageFile.php'; $img = 'your/desired/folder/image.jpg'; //note: allow_url_fopen has to be true if you are entering a url file_put_contents($img, file_get_contents($url)); …

Member Avatar for qazplm114477
0
172
Member Avatar for maxxxx

Which part of the code are you having problems in? Don't just post your entire code at first, just snippets of parts that have errors or parts you can't figure out. If you just want to put text in an element after you calculate the sub total just use .innerHTML

Member Avatar for qazplm114477
0
154
Member Avatar for aaloo

[CODE] $class = 'otherRow'; echo '<ul>'; while($info = mysql_fetch_array( $data )) { if ($class == 'otherRow') $class = ''; else $class = 'otherRow'; echo "<li class='$class'></li>"; } echo '</ul>'; [/CODE]

Member Avatar for aaloo
0
3K
Member Avatar for ppetree

So essentially this is more of a permissions issue? If that's the case having your database store permissions is probably the best way to go. Have a database table for users and roles. The roles table will most likely contain the permission's level and will be the reference table for …

Member Avatar for Fest3er
0
152
Member Avatar for Behi Jon

here ya go [CODE] <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Actor insert form</title> </head> <body> <form name="ActorForm" action="Actor_Insert.php" onSubmit="return valForm()" method="post"> Person ID: <input type="text" name="actorid" /> Required<br /> <input type="radio" name="actorgender" value="male" /> Male<br /> <input type="radio" name="actorgender" value="female" /> Female<br /> First Name: <input type="text" name="actorfname" /><br …

Member Avatar for Airshow
0
161
Member Avatar for filipgothic

the session will throw an error if there is content being outputted before it get's started, try putting the session on the first line.

Member Avatar for filipgothic
0
2K
Member Avatar for polinolin

\1 or $1 is the first pattern that gets match ex [CODE] $pattern = "~(\<a)(.*)(/a\>)~i"; //$1 will equal <a //$2 = everything after <a and before /a> etc... [/CODE] a good way to know what values gets passed to $n is to do a preg_match($pattern, $str, $match) and do a …

Member Avatar for diafol
0
86
Member Avatar for jerrinfive

could you give us the table structure? it's hard to write a query without knowing what the fields are. any more details will help.

Member Avatar for qazplm114477
0
120
Member Avatar for morrisproject

if it's a blank page, there's most likely errors, try putting a error_reporting(E_ALL ^E_NOTICE) on the top of the script

Member Avatar for hakeemtunde
0
129
Member Avatar for rayrenz

[CODE]echo preg_replace('~[^aeiou]~i', '', 'i love you')[/CODE] should remove all non vowel character. I haven't tested it yet but I might be start.

Member Avatar for skraps
0
315
Member Avatar for paddi_1

Try the following, hope it helps 1) construct the drop down properly. [CODE] $dropDown = "<select>"; while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ){ $dropDown .= "<option value='{$row['Group_ID']}'>{$row['Group_ID']}</option>"; } $dropDown .= "</select>"; //echo $dropdown [/CODE] 2) draw the in the markup and hide it visibly or display none, and rather than …

Member Avatar for qazplm114477
0
170
Member Avatar for dshiells

Could you post whatever code you've done so that we can get a clearer picture? if you want all of the radio in one array that you may have to make it a multidimensional array. ex: the input name option[home][] and option[away][]

Member Avatar for dshiells
0
9K
Member Avatar for Psyho

Your answer has been answered here [URL="http://stackoverflow.com/a/1270960/1076048"]http://stackoverflow.com/a/1270960/1076048[/URL]

Member Avatar for Stefano Mtangoo
0
119
Member Avatar for geneh23

like cereal said, since the error you are getting get's set if mysql fails, it's probably your query. Here's what you can do to debug it -echo the $sql and run that in your mysql console or phpmyadmin or query browser -echo the mysql_error() to see what specific error you …

Member Avatar for geneh23
0
184
Member Avatar for narekm

I'll try to answer what I can. your post was a bit long so... essentially you want to load certain js depending on your views? You seem to understand the idea behind MVC so I'll skip over that. [QUOTE]So I need from index.php file get 2 values $_GET["controller"] and $_GET["action"] …

Member Avatar for qazplm114477
0
176
Member Avatar for gunnerone

do a var_dump on the session variable, if it returns NULL that means it's undefined. I know you said that you have session_start() declared above. also make sure that session_start() is declared everywhere else where $_SESSION is useds ex: File1.php [CODE]session_start(); $_SESSION['foo'] = 'bar'; [/CODE] File2.php [CODE]session_start(); echo $_SESSION['foo']; //outputs: …

Member Avatar for Zagga
0
135
Member Avatar for briandapice

Here's my two cents php mailer is pretty good for sending mail with attachments and other cool stuff [URL="http://phpmailer.worxware.com/index.php?pg=phpmailer"] http://phpmailer.worxware.com/index.php?pg=phpmailer[/URL] Additionally, here's something I wrote as a wrapper class of the mail function to add attachments [CODE] <?php class xmail{ protected $body = array( 'doctype' => '<!DOCTYPE html PUBLIC "-//W3C//DTD …

Member Avatar for qazplm114477
0
465
Member Avatar for azegurb

array merges combines an array based on the keys. so if you have $_GET['test1'] = 'foo' and $_POST['test1'] = 'bar'... easier said in an example [CODE] $_GET['test1'] = 'foo'; $_POST['test1'] = 'bar'; $array = array_merge($_GET['test1'], $_POST['test1']); //$array['test1'] becomes bar //here's how I usually use array_merge class foo{ protected $_config = …

Member Avatar for diafol
0
3K
Member Avatar for ptara1

yeah, it's kinda hard to tell where the problem lies, try echoing the query itself and running it in mysql.

Member Avatar for klemme
0
175
Member Avatar for Fresco Vivir

Just for clarification's sake, you want to add another Field/Column onto you table and NOT add another row? Adding another field/column would mean that you will create another column with a data type, for example.. the fields in you table would be ID, ProductName, Quantity and if you were to …

Member Avatar for Jiaxin
0
104
Member Avatar for qazplm114477

So I've been doing some reading on what the model view controller is and from what I understand, it is pretty much a way to structure your application but I'm still not that sure and I need some help knowing if I understand the concept correctly. If I start making …

Member Avatar for diafol
0
121
Member Avatar for qazplm114477

I have spent about a couple of hours trying to read the pcre regex syntax on the php.net manual but I can't for the love of god grasp the concept of it. If anyone can help me it would be greatly appreciated. I'm trying to split some strings into an …

Member Avatar for kekkaishi
0
108
Member Avatar for raghujosh

like saadsaidi said, we need more information. are you getting an error? Has the code met the condition if($ele == 'txtbox') to display the textbox?

Member Avatar for ko ko
0
397
Member Avatar for newbie14

It's kinda hard to tell how the tab script works, is it a PHP script that generates the HTML and Javascript or is it just a javascript script that you need to pass the value to?

Member Avatar for happytogether
0
190
Member Avatar for frogboy77

Answering in the forums feels more like a hobby than anything else. I also get to learn new stuff

Member Avatar for jon.kiparsky
0
267
Member Avatar for joeyxaza

there are several ways you can do this, Here's some I can think of: - Use hidden fields [CODE] //on the first form <form action = 'form2.php' method = 'post'> //on the second form <form action = 'form3.php' method = 'post'> //put the value from the prev form <input type='hidden' …

Member Avatar for joeyxaza
0
159
Member Avatar for andrewliu

I'm no expert at e commerce but one tip I can give you is to purchase an SSL certificate to make a site secure. If you go to a website like amazon, you'll see the URL containing [url]https://example.com[/url] during purchases. [url]https://www.verisign.com/[/url] Verisign is one of the companies that provide SSL …

Member Avatar for andrewliu
0
549
Member Avatar for andrewliu
Member Avatar for andrewliu
0
117
Member Avatar for Macko888

If you have data in the database that's saved as a string PHP will still read it as a string even if the data is written as an array. If you have data in the database written like this 'word1, word2, word3' then you can always use the explode function …

Member Avatar for diafol
0
311
Member Avatar for systray

if you want to send data back to the server without submitting the page, you can always use Asynchronous JavaScript and XML(AJAX). don't be fooled by the name, AJAX is not a new programming language, but a new way to use existing standards.

Member Avatar for happytogether
0
157
Member Avatar for ankit.pandey3

you'll get an undefined index for $_POST['Sex'] if it doesn't exist in the $_POST array when the user fails to select it. you can add some sort of validation for it like so. [CODE]if(isset( $_POST['Sex'] )){ //filter }[/CODE] Or you could set the checked attribute to be checked by default, …

Member Avatar for qazplm114477
0
970
Member Avatar for RMelnikas

I've always had trouble dealing with contact forms, I usually use PHPMailer class to send my mail, you might want to check it out [url]http://phpmailer.worxware.com/[/url] If you don't like using someone else's code then make sure you have the sendmail binary installed. [url]http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html[/url] might help if you're with a hosting …

Member Avatar for qazplm114477
0
236
Member Avatar for oliver10

1 syntax I see right away is your query, UPDATE doesn't use FROM, it's just UPDATE table1 SET etc...

Member Avatar for happytogether
0
78

The End.