Sending a variable to the server

I know how to call a function or send a variable to the client from the server using a umsg, but how do I do the reverse?

Specifically, I have a text box on a derma panel, and I need to use the string entered in a server-side script.

Here is the clientside:



jobname = "Unemployed"

local JobTitle = vgui.Create( "DTextEntry", JobFrame )
	JobTitle:SetPos( 0,180 )
	JobTitle:SetTall( 20 )
	JobTitle:SetWide( 200 )
	JobTitle:SetEnterAllowed( true )
	JobTitle.OnEnter = function( ply )
		playerjob = (JobTitle:GetValue()) -- What happens when you press enter
		Msg( "Job is: "..jobname.."." )
		JobFrame:SetVisible( false )
	end


I need it so the variable jobname can be used on the serverside.

Make a console command which passes through the data in a parameter.

Use a concommand.


function ServerFunc(player , command , arguments)
	print(player:Nick().." ran command "..command.." with the args "..table.concat(" " , arguments))
end
concommand.Add("MyCommand" , ServerFunc)

Anyone saying to use the datastream is an idiot.

ok I guess so, thanks.