188 Posted Topics

Member Avatar for zack654

how about a sample page. this is why you should run your logic outside of the scope of your page, but anyway, need a sample page of your code to see what you are talking about. is there really an error, does the page stop loading because of the error? …

Member Avatar for coolest_987
0
239
Member Avatar for masocha

when you call your 'write' function, call trim() around the text you are sending. make sure your not sending something like \t (which is a tab character) and would be interpreted by your browser as such. can't help much if there is no code to look at.

Member Avatar for ddymacek
0
90
Member Avatar for Nahiyan

first off, if you don't have 10 menu items set, the script will break. for example I only set 5 elements (faking your query and setting items in a for statement), I tried to save one of the five elements I was toying with and immediately go doecument.getElementById("linkname6") is null. …

Member Avatar for ddymacek
0
196
Member Avatar for AmieCutie

Drupal, does indeed do the things you are looking for. I would look at 6 or 7 (i believe 7 is the latest version.) We run 4 drupal sites and it is exactly what you are looking for you just need to get over the learning curve of what it …

Member Avatar for ddymacek
0
164
Member Avatar for masterjiraya

If you really really just want to do it from the 'validate' form to index. you can change the action in your form tag. I believe that your hidden input needs to be the very first thing under your form tag as well [CODE] <form action="index.php?username=" method="get"> <input type="hidden" name="username" …

Member Avatar for karthik_ppts
0
6K
Member Avatar for extemer

not sure why you are calling window.location there. what is it that you want to do. are you trying to fire php when hi == true?

Member Avatar for ddymacek
0
179
Member Avatar for glycerine

it's because it is a bigint type. some things to try. remove your first % [CODE] ...WHERE acctstarttime LIKE '".$today."%'"); // that should hopefully do the trick. // since acctstarttime is a big int you can also 'CONVERT' when pulling the data. // try: $totaltimetodayresult = pg_query($link, "SELECT SUM(acctsessiontime) AS …

Member Avatar for glycerine
0
708
Member Avatar for rakwel10

you need a comma , in between '{$applicantId}' and '{$additionalConcern}' [CODE] other code...'{$applicantId}', '{$additionalConcern}'...other code [/CODE]

Member Avatar for ddymacek
0
105
Member Avatar for weeon

your link doesn't work, and what is your question. what do you want to total on this page? there are no "total = harga * unit;" 'harga' or 'unit' variables on this page at all. there are no form tags and no submit button on your form. what is your …

Member Avatar for ddymacek
0
104
Member Avatar for Farhad.idrees

yes, you are using the correct syntax. when in doubt test it, use echo to see your values. if they are the expected values that you should be seeing then you are fine, if not figure out what is set and what is not.

Member Avatar for ddymacek
0
110
Member Avatar for mittul

I downloaded and altered so I could run your code. it appears to be fine. are you getting an error? pull up your page source after you execute the code and see use firebug to inspect your elements and you can see which one is 'selected'. I defaulted my $myDate …

Member Avatar for ddymacek
0
912
Member Avatar for theazs

you can wrap you search code (right before $tag and after mysql_close() in an if statement like: [CODE] // this will only run the php code if the submit button was pressed on your page. if (isset($_POST['submit'])) { $tag... // rest of your code. mysql_close($con); } [/CODE]

Member Avatar for ddymacek
0
125
Member Avatar for BenzZz

I suggest you read up on mysql a little start here: [URL="http://www.php.net/manual/en/function.mysql-result.php"]http://www.php.net/manual/en/function.mysql-result.php[/URL] the return item from a mysql_query() call is a resource that yet needs further evaluation. To get data from the db you have to process the resource There is more than one way to do it but here …

Member Avatar for BenzZz
0
112
Member Avatar for Mona Ali

That's the first thing I noticed as well... [CODE] <input id="input3" type="text" name=""mbid/></td> //needs to be fixed //name="mbid"; // I ran the code it all seems to function just fine as long as the mbid is fixed. [/CODE]

Member Avatar for Mona Ali
0
149
Member Avatar for xXRamboNoobXx

It is a php error coming from your display_map.php page. what code is on that page?

Member Avatar for happytogether
0
165
Member Avatar for dreadrocksean

yes, need more info: just a thought. you can have code call your dynamic generated page read its contents and then send that to the api. again I don't know what your full issue is. [CODE] $to_send = file_get_contents('dynamic.html'); // then use curl to call the api $URL = 'the_url_for_api'; …

Member Avatar for ddymacek
0
267
Member Avatar for blotind

[CODE] // in your validation JSON call you need to remove this line: "category" : document.forms["myForm"]["category"].value, // there is no category input from your form. often js breaks if it cant find the item it is looking for, as is the case here. [/CODE]

Member Avatar for ddymacek
0
137
Member Avatar for klemme

on your echo statement lose the {} and put in php tags [CODE] <?php echo $row['description']; ?> // move your echo to the else of your if(!$valid) statement. //if it is not valid which is set in your above code nothing will be in $row. //so if not valid 'error', …

Member Avatar for ddymacek
0
189
Member Avatar for decade

[CODE] if(strlen($email) < 1){ echo "0__notice__Email is empty."; } // the expected result is "0__notice__Email is empty." // change your echo to this: if(strlen($email) < 1){ echo "Email is empty."; } // the expected result is "Email is empty." [/CODE] [URL="http://php.net/manual/en/function.echo.php"]http://php.net/manual/en/function.echo.php[/URL]

Member Avatar for decade
0
140
Member Avatar for davy_yg

I'm assuming your issue is on message2: [CODE] //$message2 = "Name : " + $name + "email : " + $email + "message : " + $message; //change that to this (+ is javascript) (. is php): $message2 = "Name: " . $name . " email: " . $email . …

Member Avatar for ddymacek
0
193
Member Avatar for bangla

either try file_get_contents or properly read your file. both [CODE] // assuming welcome.txt is in the same directory. $text = file_get_contents("welcome.txt"); echo $text; // also you are only opening your file and not doing anything with it. $myFile = "welcome.txt"; // set your file name & path $fh = fopen($myFile, …

Member Avatar for ddymacek
0
165
Member Avatar for Nahiyan

I didn't follow the link posted by psych.. 2 quick ways. if you are one directory above say localhost/dir1/dir2 you can reference dir1 with ../ and localhost with ../../ so: [CODE] include ('../core.inc.php'); // another way is to use your environment variable for your server. //just do an echo $_SERVER['DOCUMENT_ROOT']; …

Member Avatar for ddymacek
0
91
Member Avatar for jacksantho

this doesn't appear to have anything to do with sessions. you need to initialize $blnk array outside your loop. otherwise you are constantly overwriting what is held in $blnk every time you pass over it in the while loop. [CODE] $blnk=array(); while loop { $val=mysql_num_rows($result14); array_push($blnk,$val); } $blnkarraysum=array_sum($blnk); [/CODE]

Member Avatar for cereal
0
326
Member Avatar for megachip04

[CODE] //textarea will always be set when looking at it this way. so if(isset($_POST['textarea'] && $_POST['textarea'] != '') { // You have textarea data do something with it... $text = $_POST['textarea'] } else { echo "textarea has no value..."; } [/CODE]

Member Avatar for ddymacek
0
3K
Member Avatar for jacksantho
Member Avatar for ddymacek
0
103
Member Avatar for msowards

So you need to process them a different way. Or decide if you want to accept the file or not. The whole point of checking the file type is to make sure you are getting a specific type of file. So if the image type comes across as blank, save …

Member Avatar for ddymacek
0
904
Member Avatar for maemaumeow

I've never seen a variable set this way: [CODE] $f1=mysql_result($result,$i,"StudentID"); // since you want all of your results printed anyway use mysql_fetch_array() like this: <?php while ($row = mysql_fetch_array($result)) { $f1 = $row['StudentID']; $f2 = $row['FullName']; $f3 = $row['EnrolledTerm']; $f4 = $row['EnrolledYear']; ?> <tr> <td><?php echo $f1; ?></font></td> <td><?php echo …

Member Avatar for ddymacek
0
154
Member Avatar for jj.amonit

"I just don't understand when to say, "I need class at this point in the code."" Before you start coding is the best time to decide on how and when to use a class. That said, classes give you better flexibility and easier ways to handle your data. It also …

Member Avatar for jj.amonit
0
97
Member Avatar for spixy

first off, this is a classic case for Class / object code. drive around on phpclasses.net site for a while for a feel of classes. Clearly, since you seem to be just starting out on this project, what are you trying to do? duplicate the conditionals that happen in the …

Member Avatar for spixy
0
119
Member Avatar for erik216

if reference_num is an int type in your database it will not update because of the tick marks around $refnum. [CODE] $sql = "UPDATE `order` SET `receiver_tel` = '".$recetel."' WHERE `reference_num` = ".$refnum."; // lose the ticks ' ' <-- [/CODE]

Member Avatar for faroukmuhammad
0
221
Member Avatar for Aardwolf

I recommend using classes and objects and build up what a 'user' and friend are, and pass the data back and forth between classes. That is some intense querying from the page you are going to kill your site. if you send me your dashboard, friends and dissusers table structures …

Member Avatar for rv1990
0
91
Member Avatar for Nahiyan

requesting full code post. It appears as though that there is nothing in your $mysql_result variable.

Member Avatar for leakbali
0
205
Member Avatar for mhaselip

you want an array of banners dependent on the menu name in table menu. Do you want to rotate them on your page or only display one, once per menu call?

Member Avatar for mhaselip
0
132
Member Avatar for Clarkeez

[CODE] // This is not 'working code' only an example of what you need to do. if($matchcount >= 1) { // yes $doneString = ''; // you need to do a foreach or some look on possibly multiple images. // so either do a for, or foreach //for($i=0; $i<$matchcount; $i++) …

Member Avatar for ddymacek
0
122
Member Avatar for azhpool

then use your original query, minus the , [CODE] $sql="UPDATE stock SET HDDType='$hddtype', HDDConnection='$hddconnection', HDDSize='$hddsize', Make='$make', Model='$model', Comments='$comments', Date='$date' WHERE StockID= $id"; // that's about as 'clean' as your going to get. [/CODE]

Member Avatar for ddymacek
0
3K
Member Avatar for emilakia

[CODE] // wrong. <input name= "name" type="text"> get rid of the spaces in your form. <input name="name" type="text"> [/CODE]

Member Avatar for Hani1991
0
280
Member Avatar for manzoor.ilahi77

As far as printing the page that is more of a javascript function. without seeing your code I cannot recommend proper placement... but you can simply try to add: [CODE] onClick="window.print() to your submit button. so: <form method="post" action="somepage.php"> <input type="submit" name="submit" onClick="window.print()"> // will print the current page you …

Member Avatar for Jonell Inclan
0
310
Member Avatar for johndohmen1963

you should really use an autoincrement field on your table. but this should work for you desired solution: [CODE] //change your while statement and update query: $i=1; // old: // while($i<=$num_rows) //new: purpose to only update one row on table, use the 'nummer' retrieved in previous query while ($row = …

Member Avatar for johndohmen1963
0
110
Member Avatar for jacksantho

Your page should 'refresh' on the post to php_self. Post your full page, maybe I can help you.

Member Avatar for jacksantho
0
188
Member Avatar for Danny159

Dan, what exactly are you trying to do?... you could try [CODE] $url = "http://someurl.com/some****&!!!!!other_text"; $url = str_replace("*", "", $url); $url = str_replace("&", "", $url); $url = str_replace("!", "", $url); // or str_replace("whatever you want removed","replacement value",string_to_search); echo "url = " . $url . "<br>"; [/CODE]

Member Avatar for JobBrown
0
111
Member Avatar for skiabox

personally, I would never code a form that way. They are doing a lot of php calls when information is set on the form, there is no reason to even use php on that form as all of the validation could be done through javascript or a single php call. …

Member Avatar for ddymacek
0
270
Member Avatar for nimirraj99

The statement itself looks fine. So I would need to see the surrounding code in order to tell you why it is not working. Also, what is not working, does row['id'] ever == dec[id]? is it getting evaluated at all? put an else in with an echo to see if …

Member Avatar for nimirraj99
0
363
Member Avatar for mangel.murti
Member Avatar for Rahul1996

how are you calling your function. more code please, cannot debug your single line above.

Member Avatar for diafol
0
94
Member Avatar for heshanm

debug! instead of jumping in and doing a bunch of processing... [CODE] comment this out for now, run it on a test page... /* if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/pjpeg")) && ($_FILES["file"]["size"] < 20000000)) */ /* and start uploading files start with a pdf …

Member Avatar for mschroeder
0
141
Member Avatar for an00p

cant go into too much detail on your code, but... debug. [CODE] if (isset($_GET['prev'])) echo $_GET['prev']; if ($_GET['prev'] == "1") { echo "true"; } else { [/CODE]

Member Avatar for diafol
0
167
Member Avatar for devindamenuka

In your config instead of declaring global you could try: [CODE] define(DB_HOST,'localhost'); define(DB_USER,'root'); define(DB_PASS,'needsome1'); define(DB_BASE,'classdb'); [/CODE] and then in your classes call [CODE] $dob = new DBhandling(DB_HOST,DB_USER,DB_BASE,DB_PASS); [/CODE]

Member Avatar for ddymacek
0
302
Member Avatar for mpw5013

do you have access to the soap code itself? you need to change your api code if possible. maybe make three calls. instead of [CODE] catalog_product.list catalog_a.list catalog_b.list catalog_c.list //where each of the lists returns only a third of your data. [/CODE] if you don't have access to the api, …

Member Avatar for ddymacek
0
130
Member Avatar for johndohmen1963

to suppress warning messages you can try to use @. [CODE] // line 46 @rmdir($dir2.$file) or DIE("couldn't delete $dir$file<br />"); [/CODE]

Member Avatar for johndohmen1963
0
215
Member Avatar for luceduce

[CODE] // do more debugging of your code. // actually that isset 'Submit' is failing. // this fails everytime. if (isset($_POST['Submit'])) { echo "SUBMIT IS SET!!!<BR />"; } // your form submit buttons are all names submit, lowercase. if (isset($_POST['submit'])) { // this evaluates true everytime. echo "little submit IS …

Member Avatar for ddymacek
0
199

The End.