708 Posted Topics

Member Avatar for GEOHAM

putting html in between the php tags makes it very confusing to me. here is some code I made see if it solved the problem: [code] <?php if ((mosCountModules('user3')) || (mosCountModules('user4')) || (mosCountModules('user5'))) { echo '<div id="pod"><!-- Start Pod -->'; if (mosCountModules('user3')) { echo '<div id="podcol1" style="width:' . $podmodwidth . …

Member Avatar for GEOHAM
0
96
Member Avatar for nikhilthelegend
Member Avatar for somedude3488
0
86
Member Avatar for Taffd
Member Avatar for swamp56

I am not exactly sure what you are wanting but I would use this code to insert text into the database [code=php] <?php if (isset($_POST['submit'])) { $page = $_POST['page']; //ID OF PAGE $text = $_POST['text']; //TEXT FOR THAT PAGE $sql = "UPDATE `pages` SET `page_text` = '" . $text . …

Member Avatar for swamp56
0
102
Member Avatar for asadalim1

i use ajax to accomplish this. by using ajax the page will not have to reload and you will only have to submit the form one time to add_article.php. if you need an example let me know and i will post the url.

Member Avatar for asadalim1
0
93
Member Avatar for gurusundar
Member Avatar for Scottmandoo

i look over my code again and i can't see the problem. i have used this code a dozen times and never had a problem with it. are you sure its not the server.

Member Avatar for Scottmandoo
0
84
Member Avatar for OmniX
Member Avatar for bornok15

just assign a checkbox with a different name to each one with id value as the checkbox value. then use the foreach() statement to loop through the post results and regex the key to make sure it belongs to that set of input elements. after that take the value from …

Member Avatar for somedude3488
0
143
Member Avatar for lonestar23

you have to GET the string from the get array. try this. [code] <?php $q = $_GET['q']; //make sure you validate this string otherwise i could delete your database with sql injection $arr = explode('|',$q); $i = 0; while ($i < count($arr)) { $sql = "DELETE FROM `aCar` WHERE `aId` …

Member Avatar for somedude3488
0
79
Member Avatar for mav140

you need the send the content-type header with the script so it will be displayed as html not text. replace: [code] $headers = 'From: ' . $_POST['nombre']; [/code] with: [code] $headers = "From: $from\r\n"; $headers .= "Content-type: text/html\r\n"; [/code]

Member Avatar for miguelp
0
171
Member Avatar for somedude3488

Hello, I am thinking of creating a php game in my spare time. Any ideas on what the game should be?

Member Avatar for Riscx
0
121
Member Avatar for littlegreen
Member Avatar for littlegreen
0
213
Member Avatar for lordx78

i use this code for most of my html in the sites i have developed: [code] $html =<<<HTML any html content contained here HTML; [/code]

Member Avatar for lordx78
0
114
Member Avatar for evios

session variable use session_start(); at the beginning of the page. store the username and password infomration in $_SESSION['user'] and $_SESSION['pass'] and then just echo them on the other page using echo $_SESSION['user'];

Member Avatar for evios
0
129
Member Avatar for sufiguy

you would need to use ajax to display the message on the other persons screen. look into it and i think you will find a solution.

Member Avatar for sufiguy
0
95
Member Avatar for chicago1985

why do you need to use a server side include? php can read the file and echo the contents.

Member Avatar for somedude3488
0
91
Member Avatar for dami06

store the username in the session variable as $_SESSION['user'] = $username and then on the other page echo the name using echo $_SESSION['user'];

Member Avatar for dami06
0
108
Member Avatar for tie372

if i understand correctly, that would take a special configuration of the server itself.

Member Avatar for MattEvans
0
93
Member Avatar for rickarro
Member Avatar for drlego

what exactly are you storing in the database, url wise? more information about this would be helpful.

Member Avatar for somedude3488
0
2K
Member Avatar for JeniF

i know i can create you some working code if i understand what you are trying to do more. do you have an online example to look at?

Member Avatar for JeniF
0
320
Member Avatar for lordx78

don't use the die statement. the html is not being outputted because the nothing is executed or echoed the page after the die statement has been used. put the error message into a variable and echo it inside the html.

Member Avatar for nav33n
0
88
Member Avatar for jino

i have a pagination script i made about 6 months ago for someone on daniweb. i can send it to you and you can modify it to work for you.

Member Avatar for somedude3488
0
93
Member Avatar for scorpionz

i don't recommend using the orginal file name. you will run into the same problem over and over again if you upload the same file at all. use the time() function to give each uploaded image a unique name.

Member Avatar for somedude3488
0
347
Member Avatar for Vai

i would use: [code] <?php $catid = '1'; $sql = "SELECT * FROM `music` WHERE `music`.`catid` = '" . $catid . "'"; $query = mysql_query($sql, $con) or die('Error: ' . mysql_error()); while ($row = mysql_fetch_assoc($query)) { display information } ?> [/code]

Member Avatar for Vai
0
154
Member Avatar for abhi287

try [code] $sql = "SELECT * FROM bak_bill_cust"; $query = mysql_query($sql) or die('Error: ' . mysql_error()); $select = '<select name="test">'; $select .= '<option value=""></option>'; while ($row = mysql_fetch_assoc($query)) { $select .= '<option value="' . $row['cust_code'] . '">' . $row['cust_code'] . '</option>'; } $select .= '</select>'; echo $select; [/code]

Member Avatar for somedude3488
0
118
Member Avatar for kishou

if you are trying to see if a string "contains" a character, i would use a regex and the preg_match function

Member Avatar for somedude3488
0
106
Member Avatar for Venom Rush
Member Avatar for Venom Rush

why don't you just use the get method in the form. [code] <form action="something.php" method="get"> [/code] you could just use this.form.submit() [code] <select name="selectBox" id="selectBox" onchange="this.form.submit()"> <option></option> <option></option> <option></option> </select> </form> [/code]

Member Avatar for fatihpiristine
0
564
Member Avatar for emarkus

i saw someother errors in the code. did you solve the problem?

Member Avatar for black_ip82
0
118
Member Avatar for mike4

i suggest using javascript. get the name of the browser using javascript and refresh with the browser name in the url. have php detect it using the $_GET method and show the right code based on that input. the only problem i see is i think most wap browsers will …

Member Avatar for mike4
0
60
Member Avatar for adrive
Member Avatar for Designer_101

what exactly is the problem. is there any errors or is the table just not showing up or displaying improperly.

Member Avatar for somedude3488
0
123
Member Avatar for adrive

use a variable. var test = document.myForm.txtName.value; test = null; if(test == null){ alert('value is null'); }else if(test == 'null'){ alert('value is a string null'); //only this works! } i think this should work, but i didn't test it.

Member Avatar for ~s.o.s~
0
204
Member Avatar for microtribe

you can either use AJAX or have javascript refresh the page with the dollar amount in the url.

Member Avatar for somedude3488
0
170
Member Avatar for sallywt

i think you cannot have spaces in variable names. ex. $Post Code try $Post_Code

Member Avatar for sallywt
0
57
Member Avatar for lydia21

just add the width and border to the <table> tag. [code] echo "<table width='something' border='1'>"; [/code]

Member Avatar for lydia21
0
101
Member Avatar for bumassjp

you could just open the rss file with php, put the form data into the proper format and append it to the file.

Member Avatar for somedude3488
0
142
Member Avatar for bhakti.thakkar

there probably is a simpler way but i made this i about 3 mins. [code] <?php $hours = array(11,12,13,14); $mins = array(30,30,30,30); $count = count($hours); $i = 0; while ($i < $count) { $time[] = $hours[$i] . ":" . $mins[$i]; $i++; } ?> [/code] all of the times are now …

Member Avatar for bhakti.thakkar
0
99
Member Avatar for kahaj

i just wrote this and it works for me: [code] <script type="text/javascript"> setInterval('ads()', 5000); var i = 1; var array = new Array(); array[0] = 'adImage1.gif'; array[1] = 'adImage2.gif'; array[2] = 'adImage3.gif'; array[3] = 'adImage4.gif'; array[4] = 'adImage5.gif'; function ads() { if (i == 5) { i = 0; } …

Member Avatar for kahaj
0
236
Member Avatar for tattie

why are you opening the php statement and closing it so many times. just echo the html within the php, it so much easier to see whats wrong because its easier to read.

Member Avatar for tattie
0
151
Member Avatar for sujithfem

i didn't make any changes to your code and got a parse error on line 12. The one with the if statment in the while(). you need to work on that.

Member Avatar for sujithfem
0
156
Member Avatar for hhheng

you don't need the "RemoveHandler" stuff. all you need to do is put: AddType application/x-httpd-php .php .htm .html i personally tested this and it works on my own server.

Member Avatar for somedude3488
0
82
Member Avatar for lydia21

validating in php really isn't that hard. i have been using this function for a while. i don't know if it is the best way but it works for me. [code] function check($fieldname) { if(!preg_match("/[^a-zA-Z0-9\.\-\Ä\ä\Ö\ö\Ü\ü\,\ ]+$/s",$fieldname)) { return TRUE; } else { return FALSE; } } [/code]

Member Avatar for lydia21
0
102
Member Avatar for ivatanako
Member Avatar for ivatanako
0
96
Member Avatar for fatihpiristine

i don't know if this is exactly what you are looking for, but you could use NetLimiter. i just saw it a few days ago and i haven't really looked into it.

Member Avatar for fatihpiristine
0
93
Member Avatar for mercuryserve
Member Avatar for hopalongcassidy
0
96
Member Avatar for rjbind
Member Avatar for bling_bling_vr6

try this: [code] <?php include("connectdb.php"); if(isset($_POST['Submit'])){ $id = $_REQUEST['id']; $name = $_REQUEST['name']; $email = $_REQUEST['email']; $tel = $_REQUEST['tel']; $sql = "UPDATE phonebook SET name = '" . $name . "', email = '" . $email . "', tel = '" . $tel . "' WHERE id = '" . $id …

Member Avatar for somedude3488
0
153

The End.