Search found 35 matches

by jotorres1
Thu Oct 04, 2012 6:31 am
Forum: PHP coding => General
Topic: ECHO $_GET INTO INPUT FIELD
Replies: 3
Views: 1405

Re: ECHO $_GET INTO INPUT FIELD

Is this even a ".php" file? Are you running it locally with an apache installed? Also, just like kyle04 said, if you are trying to get the actual session id, first thing you have to do is start the session. You do this at the beginning of the file:

Code: Select all

<?php session_start();
     // etc..
?>
by jotorres1
Tue Jan 24, 2012 11:56 am
Forum: PHP coding => General
Topic: Header is not working
Replies: 9
Views: 1400

Re: Header is not working

These errors: Warning: Cannot modify header information - headers already sent by (output started at C:\inetpub\vhosts\thewink.in\httpdocs\forumcode.php:9) in C:\inetpub\vhosts\thewink.in\httpdocs\forumcode.php on line 37 Warning: Cannot modify header information - headers already sent by (output st...
by jotorres1
Thu Dec 15, 2011 1:39 pm
Forum: PHP coding => General
Topic: Storing login info temporarily so user stays logged in
Replies: 18
Views: 3856

Re: Storing login info temporarily so user stays logged in

Exactly the same way

Code: Select all

<?php 
session_start();
$_SESSION['user_id'] = $info['user_id']; // assuming you have user_id field in your database
?>
by jotorres1
Thu Dec 15, 2011 7:59 am
Forum: PHP coding => General
Topic: Storing login info temporarily so user stays logged in
Replies: 18
Views: 3856

Re: Storing login info temporarily so user stays logged in

Your talking about having a user profile. The user information should be stored in the database, and each information should have their unique user_id from the user database table. When having a user, you should have a session with the user id, and then display only the information of that user with...
by jotorres1
Thu Nov 10, 2011 6:39 pm
Forum: PHP coding => General
Topic: Recursively delete small files PHP script
Replies: 0
Views: 727

Re: Recursively delete small files PHP script

have you tried coding something?
by jotorres1
Wed Nov 09, 2011 6:12 am
Forum: PHP coding => General
Topic: PHP ERROR IN CODE
Replies: 11
Views: 2715

Re: PHP ERROR IN CODE

No problem, glad to hear it worked for ya.
by jotorres1
Tue Nov 08, 2011 7:25 pm
Forum: PHP coding => General
Topic: PHP ERROR IN CODE
Replies: 11
Views: 2715

Re: PHP ERROR IN CODE

It is very important to note that the line with the closing identifier must contain no other characters, except possibly a semicolon (;) That is from PHP.net manual. This also includes any characters after the closing identifier. You have a space after the closing identifier, see for yourself. print...
by jotorres1
Tue Nov 08, 2011 3:24 pm
Forum: PHP coding => General
Topic: php var value contains quotes
Replies: 1
Views: 831

Re: php var value contains quotes

So your using ajax?
by jotorres1
Tue Nov 08, 2011 2:40 pm
Forum: PHP coding => General
Topic: IF ( (!isset ($_GET[''])) ELSE ...
Replies: 0
Views: 713

Re: IF ( (!isset ($_GET[''])) ELSE ...

In your SQL Statement, change this:

Code: Select all

'$date1'
to this:

Code: Select all

 `$date1` 
by jotorres1
Tue Nov 08, 2011 10:19 am
Forum: PHP coding => General
Topic: php var value contains quotes
Replies: 1
Views: 831

Re: php var value contains quotes

Give this a try.

Code: Select all

while($row=mysql_fetch_array($list)) {
$item = $row['item'];
echo '<tr>';
echo '<td onclick="edit_form('.$item.');">'.$item;
echo '</td></tr>';
}
by jotorres1
Tue Nov 08, 2011 6:35 am
Forum: PHP coding => General
Topic: Upload Form if name exists increment name
Replies: 1
Views: 960

Re: Upload Form if name exists increment name

Here's an idea: $query = "SELECT imgname FROM imgtable ORDERBY imgname ASC"; $result = mysql_query($query); $array_names = array(); while($row = mysql_fetch_assoc($result)){ $array_names[] = $row; } $counter = 0; $name = ""; $not_fount = true; while($not_found == true){ $name = $filename.$cnt; if(in...
by jotorres1
Tue Nov 08, 2011 6:05 am
Forum: PHP coding => General
Topic: Couldn't find db
Replies: 0
Views: 525

Re: Couldn't find db

Are you sure localhost has the correct privledges to access phplogin?
by jotorres1
Tue Nov 08, 2011 5:56 am
Forum: PHP coding => General
Topic: Need some help - php formular to calculate for order
Replies: 0
Views: 965

Re: Need some help - php formular to calculate for order

what are you trying to calculate? total?
by jotorres1
Mon Nov 07, 2011 6:49 pm
Forum: PHP coding => General
Topic: uploading file
Replies: 19
Views: 3746

Re: uploading file

that's a relief! glad you got it to work mate! :)
by jotorres1
Mon Nov 07, 2011 6:48 pm
Forum: PHP coding => General
Topic: Upload Form if name exists increment name
Replies: 1
Views: 960

Re: Upload Form if name exists increment name

Recommendation: why don't you just encrypt the file name with the file name and datetime stamp. This way, you will never have 2 equal names in your database. If you need to grab the image for a certain user, then grab them with id's. imagetable imgid userid imgname imgpath etc.... w/e else you use i...
by jotorres1
Mon Nov 07, 2011 3:27 am
Forum: PHP coding => General
Topic: uploading file
Replies: 19
Views: 3746

Re: uploading file

Yes, the file size in the ini will always be what PHP will look at no matter what. the hidden file size is if you want to limit it for less bytes. I ran your code without any modification, and here is what I get. file type is application/vnd.ms-excel file size is 60928 file name is hr-f-0002 Leave F...
by jotorres1
Sun Nov 06, 2011 7:52 pm
Forum: PHP coding => General
Topic: Problem with show more than one dynamic tables
Replies: 0
Views: 1050

Re: Problem with show more than one dynamic tables

Hi Simon, I have noticed you have a few tag problems. You need to take the time and patience, and make sure all of your tags that are opened, should be closed. Some table tags do not close correctly in your code. Even if you have them accounted for, remember, you are using conditional statements to ...
by jotorres1
Sun Nov 06, 2011 7:28 pm
Forum: PHP coding => General
Topic: uploading file
Replies: 19
Views: 3746

Re: uploading file

Try this out: if(!($_FILES['userfile']['type'] == 'application/vnd.ms-excel' || $_FILES['userfile']['type'] == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')) Thing is, NigelRen is somewhat right. When you have inside an if statement if(etc != 123 || etc != 456) The not's( != )...
by jotorres1
Fri Nov 04, 2011 5:14 pm
Forum: PHP coding => General
Topic: uploading file
Replies: 19
Views: 3746

Re: uploading file

Can't seem to pinpoint the error. Try echoing out $_FILES['userfile']['type'] and look at what you get. There is a probability you are missing something.

I'd start there, so let me know what you get as a result.
by jotorres1
Thu Nov 03, 2011 3:34 pm
Forum: PHP coding => General
Topic: uploading file
Replies: 19
Views: 3746

Re: uploading file

No problem< practice makes purrrfection!!
by jotorres1
Wed Nov 02, 2011 6:22 am
Forum: PHP coding => Mail
Topic: How to set each check box item go to different email address
Replies: 0
Views: 1035

Re: How to set each check box item go to different email add

Your code is too long dude, but from what you are asking for, I think this might help. Once the user submits: <?php if(isset($_POST['submit'])) { $emails = array(); if(isset($_POST['checkbox_1'])) { array_push($emails, 'email' => 'EMAIL FOR CHECKBOX 1'); } // then to send them all just create a loop...
by jotorres1
Wed Nov 02, 2011 4:59 am
Forum: PHP coding => General
Topic: uploading file
Replies: 19
Views: 3746

Re: uploading file

I think you should take a look at a simple file upload tutorial I have posted in my blog. Although your code seems to be just about right, you should check for any errors that might be happening and you are not aware of.
Here's the post:
http://www.jotorres.com/en/2011/10/simp ... ad-in-php/
by jotorres1
Tue Nov 01, 2011 12:22 pm
Forum: PHP coding => Mail
Topic: put array info into a message
Replies: 1
Views: 1254

Re: put array info into a message

I would just do it this way. <?php $message1 = ""; while($menu_info = mysql_fetch_array( $menu )) //loops to collect the data { $message1 .= $menu_info['track']; $message1 .= $menu_info['artist']; $message1 .= $menu_info['requests']; } //$message1 = "echo '<pre>'.print_r($track, true) .'</pre>';" $s...
by jotorres1
Tue Nov 01, 2011 10:26 am
Forum: PHP coding => General
Topic: getting unnecessary /%22 added to links
Replies: 1
Views: 1124

Re: getting unnecessary /%22 added to links

Why don't you just manually write it?

Code: Select all

<a href ="yourdomain.com/pdf/myfile.pdf">My PDF File</a>
by jotorres1
Tue Nov 01, 2011 7:28 am
Forum: PHP coding => General
Topic: need help (.htaccess)
Replies: 4
Views: 1228

Re: need help (.htaccess)

which MVC are you using?