Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
75% Quality Score
Upvotes Received
4
Posts with Upvotes
2
Upvoting Members
4
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
3 Commented Posts
~21.0K People Reached
Favorite Forums
Favorite Tags

63 Posted Topics

Member Avatar for msz900

If you are allowed only for 60kb. the trick is split the file, if you have 120kb split in to two. then create a php script to merge. then call mergescript.php after all split files upload. everything is possible :D cheers

Member Avatar for imti321
0
402
Member Avatar for zebnoon1

or maybe you can use fetch_array(). $query = mysql_query(select column from table); while($row=mysql_fetch_array($query)){ echo $row['column']; }

Member Avatar for zebnoon
0
4K
Member Avatar for RonKevinT.Manuela

assuming you already have the list of file like this foreach($files as $file){ echo $file ." | <a href='delete.php?file=$file'>Delete</a><br/>"; } delete.php also check dir/file permission to other allow read/access/delete <?php $file = "path/to/file/$_GET[file]"; if (!unlink($file)) { echo ("Error deleting $file"); } else { echo ("Deleted $file"); } ?>

Member Avatar for diafol
0
278
Member Avatar for afaaro

Update large number of records may cause slow performance. I suggest to use bulk update. and hopefully these may help you soon if you need it. update multiple records in 1 query UPDATE mytable SET title = CASE WHEN id = 1 THEN 'I'm alive'; WHEN id = 2 THEN …

Member Avatar for afaaro
0
175
Member Avatar for anthonyjpv

add link field in table example link_id, in link_id field contain the id of FK or PK of other table you want to link to this table. All table should have a link_id so its easy for you to manipulate data. sorry for my bad english..

Member Avatar for anthonyjpv
0
193
Member Avatar for bettybarnes
Member Avatar for gotboots

[code] echo $sql //check personID value !empty, If PersonId not empty but still dont get the process, do ZER13 suggestion [/code]

Member Avatar for gotboots
0
187
Member Avatar for xXRamboNoobXx
Member Avatar for happytogether
0
164
Member Avatar for phorce

check user ip how many times it access to your website then try to use captcha

Member Avatar for happytogether
0
99
Member Avatar for mgt

1) How do I dynamically create the link (and the new URL) with PHP and MySQL? [code] //ex $query= mysql_query("select url_fields,name from table_name"); while($row=mysql_fetch_array($query)){ echo '<a href="'.$row['url_fields'].'">'.$row['name'].'</a>'; //this will create dynamic link depend on how you style it. } [/code] 2) And how do I dynamically create the new webpage, …

Member Avatar for mgt
0
129
Member Avatar for muralibobby2015

[code] $list = array('a','b','c','d','e','f','g','h'); $ms = '<select size="32" name="abc" id="abc" multiple="multiple" style="width: 276px; height:200px;" class="slct">'; foreach($list as $sl){ $ms .='<option value='.$sl.'>'.$sl.'</option>'; } $sms .= '</select><br> //to insert in db table $multiselect = explode(",",$_POST['abc']); foreach($multiselect as $selected){ mysql_query = ("insert into table_name (selected_let) values ('$selected')"); } [/code]

Member Avatar for diafol
0
1K
Member Avatar for MooGeek

as evstevemd said,use some trick like addslashes to escape ' [code] //example //when submit or click login $uname = $_POST['username']; $pwd = $_POST['password']; $query = mysql_query("select * from profile where username='".addslahes($uname)."' and password='".addslahses($pwd)."' "); [/code] or you can use $_SERVER['PHP_AUTH_USER'] or visit this link for more info [url]http://php.net/manual/en/features.http-auth.php[/url]

Member Avatar for diafol
0
133
Member Avatar for geekme

//in terminal //if you are a sudoer or if you have a root prev sudo chmod 777 -R /var/www //then enter youre password //if you cant sudo, then be root su //enter root password chmod 777 -R /var/www of if you are log in as admin, just go to /var …

Member Avatar for geekme
0
136
Member Avatar for nigelsponge

try this, let me know if theres an error [code] echo '<li><a href="p1/?ID='.$_GET['ID'].'&page='.$value.'">'.$value.'</a></li>'; [/code]

Member Avatar for diafol
0
518
Member Avatar for heshanm

nothing will happen to your account table its becasue you update the record that doesnt exist. insert record before update

Member Avatar for heshanm
0
156
Member Avatar for paarade

[code] $age = 75; $current_year = 1891; $the_day_you_born = $current_year - $age; //minus the age in the current year [/code]

Member Avatar for diafol
0
135
Member Avatar for abusive

this will read text file by line, but you can slip each line with explode [code] <?php $txtfile = file('testfile.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); foreach($txtfile as $t){ echo $t."<br><br>"; } ?> [/code]

Member Avatar for diafol
0
291
Member Avatar for eduardc

if you intend to search for specific result use where clause [code] //if you are trying to concat dont forget to add (.) mysql_query("SELECT*FROM Products where field_name ='".$result."'"); [/code]

Member Avatar for karthik_ppts
0
583
Member Avatar for Dannis86
Member Avatar for Stefano Mtangoo
0
288
Member Avatar for mangel.murti
Member Avatar for diyez treze

[QUOTE=chrishea;1567080]If you want help, then you need to demonstrate some effort and provide an initial design with some specific questions. If you can't get that far on your own, then maybe you don't deserve to graduate! There are lots of reservation systems out there and that probably includes some open …

Member Avatar for happytogether
0
108
Member Avatar for johng123

[code] <?php //if you already have country in youre database you can use it this way //you dont need to write hundreds of country $country =''; $getcountry = mysql_query("select country_name from country_table"); while($row=mysql_fetch_array($getcountry)){ $country .='<option value="'.$row['country_name']."'>".$row['country_name']."</option>"; } >? <select name="country"> <option value="">Select Country</option> <?php echo $country; ?> </select> [/code] or …

Member Avatar for happytogether
0
153
Member Avatar for public-image

[code] //change this with basic mysql_fetch_array.. just try $area = $fetch[quickref]; [/code]

Member Avatar for happytogether
0
112
Member Avatar for johng123

[code] if(isset($_POST['submit'])){ mysql_query("delete from table_name"); mysql_query("insert into table_name (column1,column2) values ('value1','value2')")or die(mysql_error()); } [/code]

Member Avatar for sainigks
0
136
Member Avatar for happytogether

Can somebody help me please? i try to generate an xls(excel) file using this code, all format work fine except the cell size(width). can anyone help me how to format the cell width? [code] </php . . . $workbook = new Spreadsheet_Excel_Writer(); $format_und =& $workbook->addFormat(); $format_und->setBottom(1);//thick $format_und->setAlign('center'); $format_und->setHAlign('equal_space'); $format_und->setBold(); $format_und->setVAlign('vcentre'); …

Member Avatar for happytogether
0
873
Member Avatar for arjani10
Member Avatar for arjani10
0
495
Member Avatar for garevn

See this to get some idea [url]http://jquery.bassistance.de/autocomplete/demo/[/url]

Member Avatar for garevn
0
200
Member Avatar for joban.ali

@joban.ali: if you dont mind, can you post youre query here? I wonder why ardav suggestions didn't work in youre script..

Member Avatar for joban.ali
0
118
Member Avatar for ss90

i already post this on other thread, hope this will help you here's how to get an array input element value [code] $x = array(); for($i=0;$i<$count;$i++){ $x[$i]['abc'] = $_POST['abc'][$i]; $x[$i]['level'] = $_POST['level'][$i]; $x[$i]['level_desc'] = $_POST['level_desc'][$i]; $x[$i]['pc_desc'] = $_POST['pc_desc'][$i]; $q = "INSERT INTO plo_pc(plo_criteria,plo_level,level_dec,plo_desc) values ('".$x[$i]['abc']."','".$x[$i]['level']."','"..$x[$i]['level_desc']"', '".$x[$i]['pc_desc']."') " ; mysql_query($q) or …

Member Avatar for ss90
0
101
Member Avatar for ss90

have you try this already? [icode] <select name="p_name[]" multiple="multiple" size="4"> <option value="" ></option> <option value="1" >1</option> . . . //etc $p_name= $_POST['p_name']; $pname=''; if( is_array($p_name)){ while (list ($key, $val) = each ($p_name)) { $pname .= $val; } } [/icode]

Member Avatar for ss90
0
2K
Member Avatar for JimBobUKII

[code] mysql("delete from masterdb where url='".$_GET['url']."' and userid='".$_SESSION['userid']."'"); if(!mysql_error()){ header("location:/index.php"); } else { echo mysql_error(); } [/code]

Member Avatar for happytogether
0
155
Member Avatar for LloydFarrell

I have suggestion jquery and dataTable nice table with paging and neat..easy to use

Member Avatar for tomato.pgn
0
123
Member Avatar for dgcerk369

NOTE: This is not my Original script, I just want to help you [icode] <? include 'connect.php'; $filename='temp.csv'; $handle = fopen("$filename", "r"); while (($data = fgetcsv($handle, 3000, ",")) !== FALSE) { $import="INSERT into inventory(tool_id,process,manufacturer,model,description) values('$data[0]','$data[1]','$data[2]','$data[3]','$data[4]');"; mysql_query($import) or die("mysql_error()"); print $import."<br>"; } fclose($handle); print "Import done"; ?> [/icode]

Member Avatar for happytogether
0
53
Member Avatar for patrickm129

I think you miss to close the form </form> try to [icode] //in login02.php //after <? //add print_r($_POST); to see if field empty or not [/icode]

Member Avatar for happytogether
0
111
Member Avatar for JimBobUKII

is this the output that you mean? <select name="select"> <option value="">select option</option> <option value="Home">Home</option> <option value="Work">Work</option> //and so on </select> if y then //query from section table $a = mysql_query("select Section_Name from Section"); echo '<select name="select">'; while($b = mysql_fetch_array($a)){ echo '<option value="'.$b['Section_Name'].'">'.$b['Section_Name'].'</option>'; } echo '</select>';

Member Avatar for JimBobUKII
0
149
Member Avatar for lsvife

localhost is different directory from myphpadmin. youre localhost dir is public_html,or if you are using ubuntu you can find it in /var/www

Member Avatar for lsvife
0
432
Member Avatar for yorro
Member Avatar for yorro
0
119
Member Avatar for kokfui

[icode] //link $a = 123; echo '<a href="page.php?id='.$a.'">go to bla</a>'; //page.php?id=123 GET['id'] [/icode]

Member Avatar for happytogether
0
123
Member Avatar for ricardo de melo

try to open php.ini look for memory_limit then change it.\ youre file is 33554432 bytes = 33MB but youre memory_limit is only 122880 bytes = 12MB try to change memory_limit larger than you're file size

Member Avatar for happytogether
0
150
Member Avatar for pnguin232

[code] if(isset($_POST['Submit'])){ $x = array(); for($i=0;$i<$count;$i++){ $x[$i]['id'] = $_POST['id'][$i]; $x[$i]['name'] = $_POST['name'][$i]; $x[$i]['lastname'] = $_POST['lastname'][$i]; $x[$i]['email'] = $_POST['email'][$i]; $sql1="UPDATE $tbl_name SET name=$x[$i]['name'], lastname=$x[$i]['lastname'], email=$x[$i]['email'] WHERE id=$x[$i]['id']"; } } [/code]

Member Avatar for happytogether
0
156
Member Avatar for raghujosh

[icode] $var4 = "<input type = 'text' name = 'lbl1'>"; $var5 = "<input type = 'text' name = 'lbl2'>"; $element2 = $var4.'<br><br>'.$var5; echo $element2; [/icode]

Member Avatar for ko ko
0
397
Member Avatar for vijaygupta

[icode] <?php if(!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) { //email valid } else { //not valid } //in username u have to make select query to see if user exist in youre database $check = mysql_query("select username from members where username='$_POST[username]'"); if(mysql_num_rows($check)<1){ //username availble } else{ //username taken } ?> [/icode] theres a lot …

Member Avatar for vijaygupta
0
106
Member Avatar for newbie14

have you try document.getElementbyId()? you can pass javascript to php by passing value to another element e.g [icode] var content = 'abc'; document.getElementById('a').value = content ; <input type="text" name="a" id="a"> <?php echo $_POST['a']; ?> [/icode]

Member Avatar for happytogether
0
190
Member Avatar for aaraf
Member Avatar for pebesoft

try to [icode] //in submit form print_r($_POST); [/icode] to see if you're post is empty or not. try tomato suggestion, add the type of you're post if its submit,text,radio or whatever

Member Avatar for markmatt
0
220
Member Avatar for begueradj

try to print_r($_POST); and [icode] //try to change && into and if(!empty($_POST['vesselname'])&&!empty($_POST['gt'])..... [/icode]

Member Avatar for begueradj
0
261
Member Avatar for bangla
Member Avatar for shredder2794

if you are only reffering to a white space, you can remove it by [icode] $name = str_replace(' ','',$name); echo $name; //syntax str_replace('the string to be replace','replace with this string',$the variable) [/icode] hope this help

Member Avatar for ivatanako
0
397
Member Avatar for Scottmandoo
Member Avatar for PinoyDev

just and the site or business name in youre database. then thats the time to make a search engine

Member Avatar for PinoyDev
0
320

The End.