|
Well what do you mean?
You can make any project with UNIX/Linux just like you can with any other operating system
If everything was not true, would it be not true that everything is not true? So by saying everything is not true, you are automatically denying that everything is not true. Im so confused...
FreeDOS
- An open source modern
MS-DOS/PC-DOS replacement.
|
|
|
|
|
I need help with how i can insert values from a checkbox and dropdown menu into mysql database and also display these values on a page using php.
here is what i have
<form action="view.php" method="post" enctype="multipart/form-data">
<table width="421" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><div align="center"><strong>Student BioData</strong></div></td>
</tr>
<tr>
<td width="82">Name</td>
<td width="215"><input name="name" type="text" id="name" size="40" /></td>
</tr>
<tr>
<td>Class</td>
<td><select name="class" id="class">
<option selected="selected"></option>
<option value="class">jss1</option>
<option value="class">jss2</option>
<option value="class">jss3</option>
</select>
</td>
</tr>
<tr>
<td>Age</td>
<td><input type="text" name="age" id="age" /></td>
</tr>
<tr>
<td>ClassTeacher</td>
<td><input type="text" name="teacher" id="teacher" /></td>
</tr>
<tr>
<td>Checked Values</td>
<td>Tall
<input type="checkbox" name="checked[]" id="tall" />
Short
<input type="checkbox" name="checked[]" id="short" />
Fat
<input type="checkbox" name="checked[]" id="fat" />
Thin
<input type="checkbox" name="checked[]" id="thin" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
</form>
<p>
<table width="220" height="138" border="1" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" valign="top"> </td>
</tr>
</table>
<p>
|
|
|
|
|
There are several tutorials available to help you with this. Here is one.[^]. More Tutorials.[^]
Broken down into sections; you should read this[^] and this[^] with regards to the POST variables. Then have a read of this[^] tutorial for inserting into a MySql database.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
hhtp://abc.com/12?ud=504132
..........<? echo $_GET['ud'] ?>........;
I want to do like this
$us=<? echo $_GET['ud'] ?>;
if($us==504132)
{
$us='Hi';
}else
{
$us='Bye';
}
$echo 'I want to say you:'<? echo $_GET['us'] ?>;
But it is not working what to do now ?
<code></code><pre></pre>
|
|
|
|
|
udch wrote: $us=<? echo $_GET['ud'] ?>;
Why are you opening new PHP tags when you are already in some? <? $us = <? ... It's just not necessary.
Check if ud is set, otherwise it is 0 .
$us = isset($_GET['ud']) ? $_GET['ud'] : 0 ;
udch wrote: $echo 'I want to say you:'<? echo $_GET['us'] ?>;
$echo is just wrong; echo is not a variable but a language construct. Read the documentation[^] to learn more. And again with the opening of more PHP tags.
echo '$ud = ' . $us;
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
I am getting value from an url Like http://abc.com/data.php?ud=567878 Now i am passing this value to an iframe of HTML exmple:-
<Body>
<Html>
<iframe frameborder=0 src="http://www.es.com/ifr?url=http://anc.com/wow.xml&amp;up_k1=<? echo $_GET['ud'] ?>&up_interval=60&amp;synd=open&amp;w=362&amp;h=350&amp;" width=284 height=120 scrolling="no"></iframe>
</Body>
</Html>
I have to write value like up_k1=567878 and it can not take value from any variable.
My problem is and i want to do is checking value like
if($ud==567878)
{
$ud='love all humans';
}
and then write it in iframe like
up_k1=love all humans
Now tell me brother can i do this ?
|
|
|
|
|
Please engage your brain.
<? echo $ud ?> instead of <? echo $_GET['ud'] ?>
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Thank you very much for all your help code is working good now.Thanks again my brother.
|
|
|
|
|
I'm just starting out with PHP development and would like to know what the best IDE is for windows is. I'm currently used to working in visual studio.
|
|
|
|
|
Personally I use Notepad++[^] although I have used PHPEclipse[^] on occasion. I've heard good things about Aptana[^]. If you want to spend money then you can use Dreamweaver, but it's not the best environment.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Thanks, I'll try Notepad++ I also have Dreamweaver and will try that too.
|
|
|
|
|
|
Sounds promising I’ll check it out.
Thanks
|
|
|
|
|
Check this code. Should it work in php?
$handle = opendir($SourceURL);
if ( !$handle )
{
closedir($handle);
return FALSE;
}
Thanks,
Parth
|
|
|
|
|
This suggestion sounds silly but Im posting it anyway. Dont you want an If/Else control instead of just an If. And also can you be more specific on whats going wrong?
|
|
|
|
|
This was in the PHP documentation[^].
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
...
closedir($dh);
}
}
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
I didnt want to post this because I know its gotta be something trivial but Ive been troubleshooting this for well over 2 hours and have gotten nowhere.
<br />
$imagename = "sig.jpeg";<br />
$im = @imagecreatefromjpeg($imgname);<br />
<br />
if(!$im)<br />
{<br />
header('Content-type: image/jpeg');<br />
imagejpeg($im);<br />
}
It prints out "Content-type: image/jpeg" so I know that $im didnt fail (if statement tests for this)
But at line "imagejpeg($im);" I get the following error:
Warning imagejpeg(): supplied argument is not a valid Image resource
Does anyone have any idea why this is happening?
|
|
|
|
|
Reptar0 wrote: if(!$im)
There seems to be a problem with your logic. You are putting the code (imagejpeg ) in the place where you are ment to handle errors.
Have you used the examples from the documentation[^]?
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Heh yea I just caught that. Yea Im retarted, I also spelled ImageName as ImgName too
Guess I shouldnt be coding at 3 in the morning.
|
|
|
|
|
schizophrenic.prOgrAmmEr
Dont plame sonme body, rather you can do your bist and give a book name
we all were beginner or what are you legend.
the next time you say such word i well kick you off
|
|
|
|
|
Hai friends,
I want to convert any type of motion picture file into FLV format when the user uploading the video into my site using PHP.Is there any encoding funcitons in PHP?
Give me your valuable ideas for me to do that.
thanks
Vasanth.A
|
|
|
|
|
Nope. You need to use something like FFMPEG if you want to automate encoding (you call it using PHP's "exec"). I say do this for more than 1000 Videos due to the time it takes to put together - whereas you can just leave flv encoder (below) running.
Or do it manually using Adobe Flash CS3 Video Encoder or similar. For less than 1000 videos - queue them up and let them go!
|
|
|
|
|
|
Is it possiable to create an array thats something other than a string, int, bool etc.?
For example, how can I go about making "$mList" an array?
<br />
class StatsData{<br />
public function StatsData(){<br />
}<br />
}<br />
<br />
$mList = new StatsData();
|
|
|
|
|
Yup, it sure is. Compared to any of the strongly typed languages, it's a snap.
Been working on a student timetable program. Only problems are that it's not an SQL database that contanis the student data, nor is the data I want sorted.
To do so, I had to create a class to hold my data and a compare function to be used when sorting the data.
Here's a snippet:
class myActivity
{
var $name;
var $teacher;
var $size;
var $location;
var $day;
var $startTime;
var $duration;
var $isStaff;
function myActivity($name, $teacher, $size, $location, $day, $startTime, $duration, $isStaff)
{
$this->name = $name;
$this->teacher = $teacher;
$this->size = $size;
$this->day = $day;
$this->startTime = $startTime;
$this->duration = $duration;
$this->isStaff = $isStaff;
$this->location = $location;
}
function _cmpDayTimeAsc($item1, $item2)
{
if ($item1->day == $item2->day)
{
return ($item1->startTime < $item2->startTime) ? -1: 1;
}
return ($item1->day < $item2->day) ? -1 : 1;
}
}
To use, it's very, very simple.
1. Declare the array
2. Add elements to the array
3. Sort the array (if needed)
4. Use as required.
$actArray = array();
$actArray[] = new myActivity($curName, $teacherName, $numStudentsInClass, $curLocation, $myDay, $startMin, $curDuration, $isStaff);
$boolDidSort = usort($actArray, array('myActivity', '_cmpDayTimeAsc'));
|
|
|
|